Skip to content

Files

Latest commit

4fe6fd3 · Jul 19, 2023

History

History
26 lines (19 loc) · 1.28 KB

cannot-access-private-repo.adoc

File metadata and controls

26 lines (19 loc) · 1.28 KB

Unable to access private repositories using Amazon EC2 Container Service

In some cases, authentication fails while attempting to use Amazon Elastic Container Service (ECS). This error occurs when the authentication configuration in the ecs.config file is missing.

In order for ECS to pull down Docker images, the following information must be included in the ECS configuration file that is located in the /etc/ecs/ecs.conf file:

ECS_ENGINE_AUTH_TYPE=dockercfg
ECS_ENGINE_AUTH_DATA={"https://quay.io": {"auth": "YOURAUTHTOKENFROMDOCKERCFG", "email": "user@example.com"}}

If you are using a robot account, you must include the username:

ECS_ENGINE_AUTH_TYPE=dockercfg (1)
ECS_ENGINE_AUTH_DATA={"https://quay.io": {"auth": "YOURAUTHTOKENFROMDOCKERCFG", "email": ".", "username": "USERNAME"}}
  1. This field is the contents of the auths attribute in .docker/config.json starting at Docker version 1.7.0, or the contents of .dockercfg before that.

After you have updated the configuration file, restart the ECS service.

For more information about ECS, see Private registry authentication for tasks.