Ask HN: Where to deploy a Docker container easily?

14 points by thiht ↗ HN
What’s the simplest way to deploy a Docker container? By this I mean I have build my image and uploaded it to a registry. Now I want to deploy it somewhere with some basic conf, a few environment variables and maybe some reasonable auto scaling (not mandatory).

What’s the easiest way to do that? AWS? Digital Ocean? Heroku? Somewhere else?

23 comments

[ 0.22 ms ] story [ 66.2 ms ] thread
Digital Ocean works pretty smoothly
If you want to omit the registry stage, with KwaWingu.com you can deploy a GitHub repo directly to a container, with full control over the Dockerfile. The container lives behind an SSL-terminated ALB to which you can associate a domain name if you're running a public web service. Auto-scaling not yet supported but coming in the future.
AWS elastic beanstalk is good if you have some AWS skill, if not, Heroku is a great place to start.
Beanstalk seems to be on it's way out, advised against new deployments in favor of ECS / Fargate.
Heroku doesn’t seem to allow deploying images from a registry, you need to let it build the image, which is not what I want.

AWS is way too hard to setup and opaque regarding pricing. I gave ECS a try (see my other comment) but it’s a no for me.

Every major vendor has a solution, as you can see from peer comments. I am partial to Google Cloud Run.
AWS ECS is pretty easy to use
How is it easy? I'm trying to deploy my container and so far I needed to create:

- a task definition

- a cluster

- a service

and it hasn't even asked me for environment variables yet.

The cluster definition asks me for network configurations, instance selection (I chose a t4g nano but the default was an expensive one, without any pricing on sight).

It's NOT easy.

I abandoned because I have no idea how much it’ll cost me. I’ll try some of the other suggestions.

This is classic AWS in terms of having many abstractions and small components. To be fair, all of the other PaaSes are doing something similar, they're just abstracting it away from the end user.

There are abundant configuration options across ECR + ECS Fargate, but for a basic container with a few environment variables you can use the defaults for almost all of them.

Also, after the initial setup, things like deploying a new version, adding / updating configuration, scaling up, etc are pretty easy to maintain.

I highly recommend Google Cloud Run: https://cloud.google.com/run
Isn't that like $40/mth to keep a container up? I think it's more geared towards ephemeral short-term container workloads.
Its pricing is pay-per-use (request or event processing), so there's no monthly minimum. They also offer a decent free tier.

An API we migrated handles millions of transactions, and costs less than $3/month to run, even cheaper than their Cloud Functions product.

I finally settled on this but it wasn’t easy either.

I had to create:

- an artifact repository and a Docker repository, because cloud run refuses to run images from a different repository

- a service account (in a completely different section)

- add the correct role on the account, in yet another section

- retrieve the password, the username and url of the Docker repo (I had to read blog articles to find these)

- and then finally push my image.

Configuring the container was easy after that, but I haven’t found yet how to configure continuous deployment from my CI pipeline. I guess I’ll have to use the gcp cli but it doesn’t seem obvious how to do it.

Any vps with docker image + docker swarm. As simple as it can get
Any PaaS provider likely supports Docker at this point. AWS Elastic Beanstalk, GCP App Engine (I think, not a GCP user myself), Heroku, and DO and Azure have some as well, I just don't know the name.

I have experience with Heroku and AWS Elastic Beanstalk, and both were very simple setups. Install the CLI, run the commands in the docs to push your image to their service, done. I think this should meet your requirements.