I've setup an EB instance that runs two Docker containers, these containers are retrieved from an ECS registry and have the correct push/pull setup.
So if I build a new docker image via codebuild and have it push to our registry, how does EB (using a multi docker container setup) pull in the new image? I've set my Dockerun file to point to the latest
container! Here is my Dockerrun.aws.json file:
{
"AWSEBDockerrunVersion": 2,
"volumes": [
{
"name": "rest-api",
"host": {
"sourcePath": "/var/app/current/rest-api"
}
},
{
"name": "thumbd",
"host": {
"sourcePath": "/var/app/current/thumbd"
}
}
],
"containerDefinitions": [
{
"name": "rest-api",
"image": "<ECS_REGISTRY_URL>",
"essential": true,
"memory": 128,
"mountPoints": [
{
"sourceVolume": "rest-api",
"containerPath": "/var/www/html",
"readOnly": true
}
]
},
{
"name": "thumbd",
"image": "<ECS_REGISTRY_URL>",
"essential": true,
"memory": 128,
"mountPoints": [
{
"sourceVolume": "thumbd",
"containerPath": "/var/www/html",
"readOnly": true
}
]
}
]
}
Question:
- How does this work internally?
- Is there something I need to setup to have EB automatically use the
:latest
container as soon as it updates?