Please support new auth format
- Dominant language
- Shell
- Stars
- 5.4k
- Forks
- 334
- PR merge metrics
- No merged PRs in 30d
Description
Hello guys,
I pull docker images on ECS from my private registry setup with [registry](https://hub.docker.com/_/registry/) 2.6 , and keep encountering `CannotPullContainerError`. Finally I found the problem is still the auth format.
According to this [page](http://docs.aws.amazon.com/AmazonECS/latest/developerguide/private-auth.html), _"The dockercfg format uses the authentication information stored in the configuration file that is created when you run the **docker login** command"_,
However, my installed docker generates the config in the format below:
```
{
"auths": {
"registry.example.com": {
"auth": "ZXhhbXBsZTpleGFtcGxlCg=="
}
}
}
```
rather than something like
```
{
"https://index.docker.io/v1/": {
"auth":"zq212MzEXAMPLE7o6T25Dk0i",
"email":"email@example.com"
}
}
```
in the document.
Currently My workaround is to have a script tranforming ~/.docker/config.json format after executing docker login and it works. The docker versions I've tried are 1.12.5 and some newer versions afterwards installed with instructions [here](https://store.docker.com/editions/community/docker-ce-server-ubuntu?tab=description), and running latest(1.14.0) ecs agent pulled from amazon/amazon-ecs-agent/ .
Thanks
Contributor guide
Research direction
Start with the ECS agent's private-registry authentication path and compare the ~/.docker/config.json auths format with the legacy dockercfg example in the issue. Reproduce a private registry pull using Docker 1.12.5 or newer and confirm that the new format works without a transformation script and no longer produces CannotPullContainerError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, docker
- Domain
- cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100