0
votes

I have been trying to make Elastic Beanstalk work with Docker AMI2 image and docker-compose.yml. The documentation says it should work out of the box with docker-compose.yml file. I use ECR as docker registry and have updated Elastic Beanstalk role to be able to pull images from ECR. https://docs.amazonaws.cn/en_us/elasticbeanstalk/latest/dg/single-container-docker-configuration.html

Create a docker-compose.yml file to deploy a Docker image from a hosted repository to Elastic Beanstalk. No other files are required if all your deployments are sourced from images in public repositories. (If your deployment must source an image from a private repository, you need to include additional configuration files for authentication. For more information, see Using images from a private repository.) For more information about the docker-compose.yml file, see Compose file reference on the Docker website.

However, I keep getting the following message when spinning up the environment:

Instance deployment: You must specify a Docker image in either 'Dockerfile' or 'Dockerrun.aws.json' in your source bundle. The deployment failed.

According to documentation Dockerrun.aws.json should only be required for the old AMI. Has anyone come across similar issue?

1

1 Answers

0
votes

Found the solution. The documentation states docker-compose.yml is the only file needed but it still needs to be zipped before being uploaded to Elastic Beanstalk environment.