Search code examples
amazon-web-servicesdockerdocker-registryamazon-ecstutum

How do I pull Docker images from the Tutum private registry with Amazon ECS?


I am trying to set up an Amazon ECS deployment which employs an image from the Tutum private Docker registry. Tutum being private, it requires authenticating obviously.

As per the ECS documentation, I've modified the file '/etc/ecs/ecs.config' on the EC2 instance to contain the correct authentication credentials for Tutum:

ECS_ENGINE_AUTH_TYPE=dockercfg
ECS_ENGINE_AUTH_DATA={"tutum.co":{"auth":"<auth-string>","email":"<my-email>"}}

The auth string is a Base64 encoding of my Tutum credentials: '<username>:<password>'.

However, when I try to run the corresponding ECS task, it fails with this message: CannotPullContainerError: Authentication is required.

How do I properly configure ECS to authenticate against the Tutum registry, so I can successfully pull images from there?


Solution

  • Seems as if what it took was to reboot the EC2 instance, so that the settings in '/etc/ecs/ecs.config' were applied.