Dynamically changing the dockerrun.aws.json tag during deployment

Is there a way to dynamically retrieve the version tag from my __init__.py file and add it to the dockerrun.aws.json image name, for example:

 { "AWSEBDockerrunVersion": "1", "Authentication": { "Bucket": "dockerkey", "Key": "mydockercfg" }, "Image": { "Name": "comp/app:{{version}}", "Update": "true" }, "Ports": [ { "ContainerPort": "80" } ] } 

This, when I do eb deploy , it will build the correct version. At the moment, I must continue to modify the json file with every deployment.

+5
source share
1 answer

I also stumbled upon this last year when AWS support stated that this was not possible. I ended up writing a script that receives the docker tag as a parameter and compiles a dockerrun.aws.json file on the fly with the correct tag.

+6
source

Source: https://habr.com/ru/post/1237746/


All Articles