Closed teutat3s closed 3 years ago
I'll take a look at this - but in the meantime could you provide the versions of:
compose: 1.25.2 docker: 19.03.5 sdc-docker: docker release-20200102-20200103T002424Z-g3faf7f9
So far I cannot reproduce this - at least using a private registry from quay.io:
$ docker-compose-1.25 up -d
Pulling sleepy (quay.io/twhiteman/hello-sleeper:)...
latest: Pulling from quay.io/twhiteman/hello-sleeper (req e2eaf7e9-1152-4326-b7b9-2b83c388f12a)
a98bfe784296: Pull complete
Digest: sha256:a3756c155799930bf7e2febe755a0391b41c3fa9a5ce18794c1e3fa4d0955856
Status: Downloaded newer image for quay.io/twhiteman/hello-sleeper:latest
Creating quayio_sleepy_1 ... done
What version of the docker registry does your hub.example.com run?
I updated the registry to the latest version now - 2.7.1
.
No change. Maybe the reason is I am using basic auth with an nginx reverse proxy as endpoint before the registry?
But docker login
works fine... hmmm
EDIT:
I've also found a similar issue reported here, but should be resolved in compose 1.25
as per the changelog.
Also tried changing the "credsStore"
in ~/.docker/config.json
from desktop
to osxkeychain
- no difference.
If I change the docker endpoint from triton to my local docker engine, pulling with docker-compose works fine...
There does seem to be a lot of reports of docker compose with Basic Auth failing, I wonder if an older version of docker-compose (say 1.23) works with Triton? https://github.com/docker/compose/releases/tag/1.23.2
Made no difference, here are verbose outputs of docker-compose and adminui in a gist
https://gist.github.com/teutat3s/c57e3032d33790c11afb36ee61611fe3
Thanks for testing that.
I've setup a basic auth registry in my local environment (using self-signed SSL certificates), which seems to work, and to my surprise also works correctly for triton as well.
Note that I'm using a custom hostname "myreg.triton" - so I had to (in the IMGAPI zone) add a /etc/hosts entry to map the hostname "myreg.triton" to the correct ip address.
Here's more details of what I ran and what I've configured:
$ export | grep DOCKER_HOST
declare -x DOCKER_HOST="tcp://dingo.triton:2376"
$ docker-compose pull
Pulling alp (myreg.triton/alpine:latest)...
/usr/local/Cellar/docker-compose/1.15.0/libexec/lib/python2.7/site-packages/requests/packages/urllib3/connection.py:303: SubjectAltNameWarning: Certificate for dingo.triton has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)
SubjectAltNameWarning
latest: Pulling from myreg.triton/alpine (req a893cee0-de4a-46b0-8c1a-496c29879364)
c9b1b535fdd9: Pull complete
Digest: sha256:ddba4d27a7ffc3f86dd6c2f92041af252a1f23a8e742c90e6e1297bfa1bc0c45
Status: Downloaded newer image for myreg.triton/alpine:latest
$ docker --version
Docker version 17.06.0-ce, build 02c1d87
$ docker-compose --version
docker-compose version 1.15.0, build unknown
# sdcadm insts docker
INSTANCE SERVICE HOSTNAME VERSION ALIAS
aec18af5-6c04-40cb-8287-df96505f5cfa docker headnode release-20200130-20200129T191403Z-g3faf7f9 docker0
My registry is running version 2.6.2 in a ubuntu instance (real hardware):
/usr/bin/docker-registry --version
/usr/bin/docker-registry github.com/docker/distribution v2.6.2+debian
Somehow this started working for me, don't know which change in my setup caused it. Working with:
❯ docker-compose --version
docker-compose version 1.26.2, build unknown
❯ docker --version
Docker version 20.10.6, build v20.10.6
docker release-20210128-20210128T003947Z-ge75d796 (uuid: fe72a50a-339b-43cf-a086-fb4f4b655407)
❯ cat ~/.config/docker/config.json
{
"auths": {
"hub.great.domain": {
"auth": "long_hash"
}
}
}
It seems that docker-compose on sdc-docker does not read stored credentials of private registries after doing a
docker login
. Apull-image-v2-1.0.0
of a new image from a private registry fails. Issuing adocker pull
immediately afterwards works fine. So the stored credentials work fine for puredocker
commands.PI:
20200103T034110Z
docker0:docker release-20200102-20200103T002424Z-g3faf7f9
I would gladly provide more logs to debug this further if needed.
Command output:
Logs of failed
pull-image-v2-1.0.0
with docker-compose: