News for hackers. Stuff that matters.

Ask HN: Where to deploy a Docker container easily?

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 | 14 points | on HN )
Re:Ask HN: Where to deploy a Docker container easily? by jjice on Thursday April 21, 2022 @10:00AM (#31109508)
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.

Re:Ask HN: Where to deploy a Docker container easily? by tonicbbleking on Tuesday May 03, 2022 @02:40PM (#31251871)
Pretty easy with Render: https://render.com/

They even build the image for you, so you don't need a registry.

Re:Ask HN: Where to deploy a Docker container easily? by nreece on Wednesday April 20, 2022 @11:40PM (#31105829)
I highly recommend Google Cloud Run: https://cloud.google.com/run
Re:Ask HN: Where to deploy a Docker container easily? by thiht on Thursday April 21, 2022 @05:53PM (#31115645)
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.

Re:Ask HN: Where to deploy a Docker container easily? by nreece on Thursday April 21, 2022 @10:50PM (#31117683)
It's usually just one command:

  gcloud run deploy
See 'Deploying to Cloud Run from source': https://cloud.google.com/run/docs/quickstarts/build-and-depl...

I also like deploying to Cloud Run right from Cloud Shell Editor (their web IDE, viz like VS Code in the browser): https://shell.cloud.google.com

Re:Ask HN: Where to deploy a Docker container easily? by reducesuffering on Thursday April 21, 2022 @03:26AM (#31106829)
Isn't that like $40/mth to keep a container up? I think it's more geared towards ephemeral short-term container workloads.
Re:Ask HN: Where to deploy a Docker container easily? by nreece on Thursday April 21, 2022 @05:07AM (#31107338)
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.

Re:Ask HN: Where to deploy a Docker container easily? by kwawingu on Wednesday April 20, 2022 @06:45PM (#31104038)
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.
Re:Ask HN: Where to deploy a Docker container easily? by whalifiied on Thursday April 21, 2022 @02:57AM (#31106692)
Docker Desktop is a starting point for you. https://www.docker.com/blog/getting-started-with-docker-desk...
Re:Ask HN: Where to deploy a Docker container easily? by tedmiston on Thursday April 21, 2022 @01:19PM (#31112359)
Dokku is another option if you are looking for something open source that you can run on a VM on any cloud.

https://github.com/dokku/dokku

Re:Ask HN: Where to deploy a Docker container easily? by toomuchtodo on Thursday April 21, 2022 @04:04PM (#31114541)
Available in Digital Ocean’s marketplace: https://marketplace.digitalocean.com/apps/dokku
Re:Ask HN: Where to deploy a Docker container easily? by gfd on Wednesday April 20, 2022 @08:18PM (#31104709)
AWS ECS is pretty easy to use
Re:Ask HN: Where to deploy a Docker container easily? by thiht on Thursday April 21, 2022 @07:53AM (#31108285)
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.

Re:Ask HN: Where to deploy a Docker container easily? by tedmiston on Thursday April 21, 2022 @01:11PM (#31112215)
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.

Re:Ask HN: Where to deploy a Docker container easily? by smackeyacky on Wednesday April 20, 2022 @11:17PM (#31105717)
It's not the most obvious thing to set up, but once it's set up it's basically set and forget.

I prefer to use the AWS CLI, so you'll have to install that. Then it's a matter of setting up an aws-ecs-tools-defaults.json file so that the AWS CLI knows what to do with your container.

Docker documentation: https://docs.docker.com/cloud/ecs-integration/

AWS documentation: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/...

Re:Ask HN: Where to deploy a Docker container easily? by aristofun on Thursday April 21, 2022 @03:56AM (#31106983)
Any vps with docker image + docker swarm. As simple as it can get
Re:Ask HN: Where to deploy a Docker container easily? by asimpson on Wednesday April 20, 2022 @07:12PM (#31104258)
Fly.io is really good.
Re:Ask HN: Where to deploy a Docker container easily? by verdverm on Wednesday April 20, 2022 @08:14PM (#31104686)
Every major vendor has a solution, as you can see from peer comments. I am partial to Google Cloud Run.
Re:Ask HN: Where to deploy a Docker container easily? by yuppie_scum on Wednesday April 20, 2022 @07:45PM (#31104507)
AWS elastic beanstalk is good if you have some AWS skill, if not, Heroku is a great place to start.
Re:Ask HN: Where to deploy a Docker container easily? by thiht on Thursday April 21, 2022 @08:03AM (#31108351)
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.

Re:Ask HN: Where to deploy a Docker container easily? by reducesuffering on Thursday April 21, 2022 @04:18AM (#31107090)
Beanstalk seems to be on it's way out, advised against new deployments in favor of ECS / Fargate.
Re:Ask HN: Where to deploy a Docker container easily? by brunooliv on Wednesday April 20, 2022 @06:38PM (#31103987)
Digital Ocean works pretty smoothly
Re:Ask HN: Where to deploy a Docker container easily? by rtcoms on Thursday April 21, 2022 @04:41AM (#31107208)
Check Caprover