Introducing our new CEO Don Johnson - Read More

amazon/amazon-ecs-agent

Verified Publisher

By Amazon Web Services

Updated 8 days ago

Amazon Elastic Container Service Agent

Artifact
Image
106

1B+

Amazon Elastic Container Service Agent

http://aws.amazon.com/ecs/

This image is meant to be run on Amazon EC2.

Running this image outside of Amazon EC2 is not supported and likely will not work due to reliance on the Amazon EC2 Metadata Service, among other reasons.

Tags

The latest tag should always have the latest stable version of the agent. There are also tags corresponding to each release version of the format vX.Y.Z, e.g. v1.1.0.

Usage

You may find additional documentation for this image in the Amazon ECS Documentation.

If you are running the Amazon ECS Optimized AMI then you should run the ECS Agent via start ecs.

When running directly via Docker, the image must be able to access the host's Docker daemon to operate correctly. The recommended way to do this is to bindmount in Docker's socket, similar to the command below:

docker run --name ecs-agent -d -v /var/run/docker.sock:/var/run/docker.sock -v /var/log/ecs/:/log -v /var/lib/ecs/data:/data -p 127.0.0.1:51678:51678 -e ECS_LOGFILE=/log/ecs-agent.log -e ECS_LOGLEVEL=info -e ECS_DATADIR=/data amazon/amazon-ecs-agent:latest

The full list of environment variables that you may edit can be found on the Agent's Github page.

Updating

If you are using the Amazon ECS Optimized AMI, you should follow the instructions documented here.

Otherwise, you can update to the latest agent on Dockerhub by running the following:

docker stop ecs-agent
docker rm ecs-agent
docker pull amazon/amazon-ecs-agent:latest

You should then follow the "Usage" instructions to re-run it.

Source code

Source code is available in the related Github repository: https://github.com/aws/amazon-ecs-agent.

Issues

Issues should be reported on the Github issues page.

Docker Pull Command

docker pull amazon/amazon-ecs-agent