Skip to content

Instantly share code, notes, and snippets.

@aduis
Last active June 2, 2016 07:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aduis/1af67be929e24df60c6369157f3f15d9 to your computer and use it in GitHub Desktop.
Save aduis/1af67be929e24df60c6369157f3f15d9 to your computer and use it in GitHub Desktop.
debug sonatype issue
#start sonatype
docker run -d -p 8081:8081 -p 8083:8083 sonatype/nexus3
#run docker daemons
docker run --privileged --name docker191 -d docker:1.9.1-dind --insecure-registry=192.168.99.100:8083
docker run --privileged --name docker1111 -d docker:1.11.1-dind --insecure-registry=192.168.99.100:8083
docker run --privileged --name docker191v2 -d docker:1.9.1-dind --disable-legacy-registry=true --insecure-registry=192.168.99.100:8083
#push image with 1.9.1 and 1.11.1
docker run --rm -it --link docker1111:docker --entrypoint="" docker:1.11.1 sh
# docker login 192.168.99.100:8083
# docker pull alpine
# docker tag alpine 192.168.99.100:8083/alpine:1111
# docker push 192.168.99.100:8083/alpine:1111
docker run --rm -it --link docker191:docker --entrypoint="" docker:1.9.1 sh
# docker login 192.168.99.100:8083
# docker pull alpine
# docker tag alpine 192.168.99.100:8083/alpine:191
# docker push 192.168.99.100:8083/alpine:191
#pull images with 1.9.1 and 1.11.1
docker run --rm -it --link docker1111:docker --entrypoint="" docker:1.11.1 sh
# docker login 192.168.99.100:8083
# docker pull 192.168.99.100:8083/alpine:1111
# works!
# docker pull 192.168.99.100:8083/alpine:latest
# works!
docker run --rm -it --link docker191:docker --entrypoint="" docker:1.9.1 sh
# docker login 192.168.99.100:8083
# docker pull 192.168.99.100:8083/alpine:1111
# does not work! error nor found -> fallback to api v1
docker run -it --link docker191v2:docker --entrypoint="" docker:1.9.1 sh
# docker login 192.168.99.100:8083
# docker pull 192.168.99.100:8083/alpine:1111
# does not work! error -> history does not match layers of tags
######## => same scenario not reproducible with docker distribution (image: registry:2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment