amazon web services - How to ensure to update Docker image on AWS ECS? -
i use docker hub store private docker image, repository has webhook once image updated calls service built to:
- update ecs task definition
- update ecs service
- deregister old ecs task definition
the service running accordingly. after runs ecs creates new task new task definition, stops task old task definition , service come new definition.
the point docker image not updated, once service starts in new task definition remains old image.
am doing wrong? how o ensure docker image updated?
after analysing aws ecs logs found out problem in ecs docker authentication.
to solve i've added following data file /etc/ecs/ecs.config
ecs_cluster=default ecs_engine_auth_type=dockercfg ecs_engine_auth_data={"https://index.docker.io/v1/":{"auth":"your_docker_hub_auth","email":"your_docker_hub_email"}}
just replace your_docker_hub_auth , your_docker_hub_email own information , shall work properly.
to find information can execute docker login
on own computer , data in file ~/.docker/config.json
for more information on private registry authentication topic please @ http://docs.aws.amazon.com/amazonecs/latest/developerguide/welcome.html
Comments
Post a Comment