amazon web services – Deploying Docker image to AWS elastic beanstalk
Update Oct 2020
Docker-compose is now officially supported by EB:
- AWS Elastic Beanstalk Adds Support for Running Multi-Container Applications on AL2 based Docker Platform
Original answer below
In both cases you have to translate your
docker-compose.yml into Dockerrun.aws.json. The file has different form, depending on whether you are using single or multi-container setup.
How do I upload my docker image to aws?
If its single EB setup, you can just provide your
Dockerfile to EB and it will take care of everything for you. For multi-conainer EB, you can store your images in public repo such as dockerhub, or a private repo such as ECR.
To translate your
docker-compose.yml file into
Dockerrun.aws.json, you can try using container-transform tool. It can be helpful, though you will most likely need to manually make further adjustments to the file generated.