How to use the latest image with ECS

I am currently using ECS to deploy a web application. This Application is pushed on my ECR with the latest tag but putting new images doesn’t seem to change the code at deployment.

I tried to use the answer found here How do I deploy updated Docker images to Amazon ECS tasks? using aws ecs update-service --cluster <cluster name> --service <service name> --force-new-deployment.

I also put ECS_IMAGE_PULL_BEHAVIOR=always in my ecs config and deployment_minimum_healthy_percent = 0 and deployment_maximum_percent = 200 in my deployment settings.

I notice that the image digest is matching the latest image, but by logging on the container, the code is not different from the previous version. But by executing docker pull <my_image:latest> the changes are there.

Source: Docker Questions

LEAVE A COMMENT