You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attempt to login using docker login ... ${ACCOUNT_ID}.dkr.ecr.ap-southeast-2.amazonaws.com and notice that there is an error message around the credential helper not supporting store. (This is expected).
Attempt to login using the above method but add https:// to the front of the [SERVER] URL. Notice that this will bypass the credential helper and login, storing the credentials in the normal CredStore you have configured.
Update your credential helper config so that there is an entry for both the URL with and without a scheme.
It's actually non-obvious to me what the default scheme for [SERVER] is if I do not provide one to docker login. As an example, the output from aws ecr get-login in older versions of aws-cli version 1, would output a command for your shell to evaluate, where the URL was using the https scheme. In which case, the correct way to use aws-cli would be bypassing the credential helper probably accidentally. That "bug" may well be the aws-cli v1 behaving incorrectly by providing a HTTPS URL, I can't tell.
As a reference docker pull ${ACCOUNT_ID}.dkr.ecr.ap-southeast-2.amazonaws.com/my-image doesn't allow a scheme, it returns invalid reference format if you try and add one.
Describe the results you received:
When doing a docker login, a credential helper will only be used if the [SERVER] matches the entry on credHelpers EXACTLY. Even though when you use docker login without a scheme attached, it seemingly defaults to https.
Describe the results you expected:
If I configure a credential helper in credHelpers without a scheme, then I expect it to be used no matter what scheme I use on the docker login option.
Since I can't specific a scheme on docker pull or docker run image references, it would seem the only URL worth putting in credHelpers is a URL without a scheme. As such, doing a docker login with a scheme of any kind will never match a credential helper. I think docker login should either not accept a scheme for [SERVER] at all, the same way docker pull can not. Or when matching against a credential helper, it should ignore the scheme.
Additional information you deem important (e.g. issue happens only occasionally):
Output of docker version:
Client: Docker Engine - Community
Version: 20.10.16
API version: 1.41
Go version: go1.18.2
Git commit: aa7e414fdc
Built: Wed May 11 16:22:17 2022
OS/Arch: darwin/arm64
Context: default
Experimental: true
Server: Docker Desktop 4.6.1 (76265)
Engine:
Version: 20.10.13
API version: 1.41 (minimum version 1.12)
Go version: go1.16.15
Git commit: 906f57f
Built: Thu Mar 10 14:05:37 2022
OS/Arch: linux/arm64
Experimental: false
containerd:
Version: 1.5.10
GitCommit: 2a1d4dbdb2a1030dc5b01e96fb110a9d9f150ecc
runc:
Version: 1.0.3
GitCommit: v1.0.3-0-gf46b6ba
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Description
When using
docker login
with a[SERVER]
argument that is a fully qualified URL, it bypasses the credential helpers.Steps to reproduce the issue:
docker login ... ${ACCOUNT_ID}.dkr.ecr.ap-southeast-2.amazonaws.com
and notice that there is an error message around the credential helper not supportingstore
. (This is expected).https://
to the front of the[SERVER]
URL. Notice that this will bypass the credential helper and login, storing the credentials in the normal CredStore you have configured.It's actually non-obvious to me what the default scheme for
[SERVER]
is if I do not provide one todocker login
. As an example, the output fromaws ecr get-login
in older versions of aws-cli version 1, would output a command for your shell to evaluate, where the URL was using thehttps
scheme. In which case, the correct way to use aws-cli would be bypassing the credential helper probably accidentally. That "bug" may well be the aws-cli v1 behaving incorrectly by providing a HTTPS URL, I can't tell.As a reference
docker pull ${ACCOUNT_ID}.dkr.ecr.ap-southeast-2.amazonaws.com/my-image
doesn't allow a scheme, it returns invalid reference format if you try and add one.Describe the results you received:
When doing a
docker login
, a credential helper will only be used if the[SERVER]
matches the entry oncredHelpers
EXACTLY. Even though when you usedocker login
without a scheme attached, it seemingly defaults tohttps
.Describe the results you expected:
If I configure a credential helper in
credHelpers
without a scheme, then I expect it to be used no matter what scheme I use on thedocker login
option.Since I can't specific a scheme on
docker pull
ordocker run
image references, it would seem the only URL worth putting incredHelpers
is a URL without a scheme. As such, doing adocker login
with a scheme of any kind will never match a credential helper. I thinkdocker login
should either not accept a scheme for[SERVER]
at all, the same waydocker pull
can not. Or when matching against a credential helper, it should ignore the scheme.Additional information you deem important (e.g. issue happens only occasionally):
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):
The text was updated successfully, but these errors were encountered: