Currently, Amazon deprecated Multi-container Docker running on 64bit Amazon Linux
.Need migrate to Docker running on 64bit Amazon Linux 2
. In 1st version , we used Dockerrun.aws.json v2
to manage multi container docker. In latest version (Docker running on 64bit Amazon Linux 2
), we need to use Dockerrun.aws.json v3
or docker-compose
. But there is no working example or blogs are available. Can i get working samples ?.
In regards to Elastic Beanstalk and the Docker running on 64bit Amazon Linux 2 platform.
I was struggling too and finally got to the bottom of it. What confused me is that the documentation makes it seem like you can choose to use either, the Dockerrun.aws.json (v3) or a docker-compose.yml in your EB application package.
Then you go looking for the documentation on Dockerrun.aws.json (v3), and you won't find it anywhere.
The reason for this is that, you don't get a choice. If you want to run multiple containers you must include a docker-compose.yml in your application package. The only thing the Dockerrun.aws.json (v3) allows you to do is configure the s3 bucket and key to the location of your container repository authentication file ".dockercfg"
This is essentially the documentation for "Dockerrun.aws.json (v3)" it doesn't support anything similar to the "Dockerrun.aws.json (v2)
{
"AWSEBDockerrunVersion": "3",
"Authentication": {
"bucket": "DOC-EXAMPLE-BUCKET",
"key": "mydockercfg"
}
}
Include a docker-compose.yml and you'll need the dockerrun.aws.json (v3) only if the docker images are in a private repository.
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/single-container-docker-configuration.html
According to AWS Docs, Multi-container Docker running on Amazon Linux can be migrated to ECS on Amazon Linux 2
This option seems to be easier to apply with the CLI than using the Elastic Beanstalk console because it requires 1 single command:
aws elasticbeanstalk update-environment \
--environment-name ${my-env} \
--solution-stack-name "64bit Amazon Linux 2 ${version} running ECS" \
--region ${my-region}
I'd suggest that you first clone the environment you'd like to upgrade, apply the command mentioned above to this copied environment and test it, if everything works as expected then you can use a blue/green deployment to avoid downtime.
I hope this helps someone!
Now (2023), if you still need to migrate from a Multi-container Docker running on 64bit Amazon
platform you can choose to create an ECS running on 64bit Amazon Linux 2/3.2.5
environment which will support the same Dockerrun.aws.json
(v2) files as the multi-container one: Migrating Multi-container Docker running on Amazon Linux to ECS on Amazon Linux 2.
Or you can also try to migrate following the response given by Osain.
© 2022 - 2024 — McMap. All rights reserved.