ElasticBeanstalk Docker
Links: 102 AWS DVA Index
Using Docker¶
Single Container¶
- Run your application as a single docker container
- Either provide:
Dockerfile
: Elastic Beanstalk will build and run the Docker containerDockerrun.aws.json (v1)
: Describe where already built docker image is along with the other essential details like ports, volumes etc and Beanstalk will deploy the container for us on EC2 instances.- Must be at the root of source code.
Beanstalk in Single Docker Container DOES NOT use ECS.
Multi Container¶
- Multi Docker helps run multiple containers per EC2 instance in EB
- This will create for you:
- ECS Cluster
- EC2 instances, configured to use the ECS Cluster
- Load Balancer (in high availability mode)
- Task definitions and execution
- Requires a config
Dockerrun.aws.json (v2)
at the root of source code- It should be a JSON file only it cannot be a YAML file.
Dockerrun.aws.json
is used to generate the ECS task definition.- Your Docker images must be pre-built and stored in ECR for example.
Last updated: 2023-02-19