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
[ 0.22 ms ] story [ 66.2 ms ] threadAWS 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.
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/...
- 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.
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.
An API we migrated handles millions of transactions, and costs less than $3/month to run, even cheaper than their Cloud Functions product.
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.
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
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.
https://github.com/dokku/dokku
They even build the image for you, so you don't need a registry.