Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jib build fails to older versions of docker-registry #701

Closed
briandealwis opened this issue Jul 24, 2018 · 5 comments
Closed

Jib build fails to older versions of docker-registry #701

briandealwis opened this issue Jul 24, 2018 · 5 comments

Comments

@briandealwis
Copy link
Member

Description of the issue:

Jib fails to older versions of docker registry, whereas a current version of the docker client is able to push.

The following versions fail:

  • 2.1: 400 Bad Request, {"errors":[{"code":"TAG_INVALID","message":"manifest tag did not match URI"}]}
  • 2.2: 400 Bad Request, {"errors":[{"code":"MANIFEST_INVALID","message":"manifest invalid","detail":{}}]}

The following versions succeed:

  • 2.3, 2.4, 2.5, 2.6

Expected behavior:

Steps to reproduce:

Start the registry:

docker run -it - -rm -p 5000:5000 registry:2.1

Push an example project (note: requires allowInsecureRegistries=true):

mvn -Dimage=localhost:5000/testimage jib:build
@briandealwis
Copy link
Member Author

With 2.1, the registry log shows the following (but pushing to localhost:5000/foo/java:latest produces identical results):

ERRO[0011] invalid tag on manifest payload: "" != "latest"  http.request.contenttype=application/vnd.docker.distribution.manifest.v2+json http.request.host=localhost:5000 http.request.id=2fe6e7a1-f232-40ae-a8ca-8957ea6453c6 http.request.method=PUT http.request.remoteaddr=172.17.0.1:41900 http.request.uri=/v2/foo/java/manifests/latest http.request.useragent=jib 0.9.8-SNAPSHOT jib-maven-plugin Google-HTTP-Java-Client/1.23.0 (gzip) instance.id=a2119b5d-9f2f-4577-ac1c-c62075f79043 vars.name=foo/java vars.reference=latest version=v2.1.1
ERRO[0011] response completed with error                 err.code=TAG_INVALID err.message=manifest tag did not match URI http.request.contenttype=application/vnd.docker.distribution.manifest.v2+json http.request.host=localhost:5000 http.request.id=2fe6e7a1-f232-40ae-a8ca-8957ea6453c6 http.request.method=PUT http.request.remoteaddr=172.17.0.1:41900 http.request.uri=/v2/foo/java/manifests/latest http.request.useragent=jib 0.9.8-SNAPSHOT jib-maven-plugin Google-HTTP-Java-Client/1.23.0 (gzip) http.response.contenttype=application/json; charset=utf-8 http.response.duration=6.8127ms http.response.status=400 http.response.written=79 instance.id=a2119b5d-9f2f-4577-ac1c-c62075f79043 vars.name=foo/java vars.reference=latest version=v2.1.1

With 2.2:

ERRO[0085] response completed with error                 err.code=MANIFEST_INVALID err.detail=missing signature key err.message=manifest invalid go.version=go1.5.2 http.request.contenttype=application/vnd.docker.distribution.manifest.v2+json http.request.host=localhost:5000 http.request.id=a6cb438a-1edd-4bf8-b010-cd61f5624f79 http.request.method=PUT http.request.remoteaddr=172.17.0.1:41808 http.request.uri=/v2/foo/java/manifests/latest http.request.useragent=jib 0.9.8-SNAPSHOT jib-maven-plugin Google-HTTP-Java-Client/1.23.0 (gzip) http.response.contenttype=application/json; charset=utf-8 http.response.duration=9.3816ms http.response.status=400 http.response.written=82 instance.id=86dad5f4-f7dd-4d1f-b981-4b6600b71460 vars.name=foo/java vars.reference=latest version=v2.2.1

@chanseokoh
Copy link
Member

Probably the images before the tag 2.3 are too old and don't support the manifest schema 2.

@chanseokoh
Copy link
Member

So this is basically #698, and the question is if we really want to put resources to be able to create schema 1 images. I'm not so thrilled, TBH.

@briandealwis
Copy link
Member Author

That does seem to be it: Docker Registry compatibility notes says:

For registry versions 2.2.1 and below, the registry always stores and serves Schema 1 manifests. Engine 1.10 first attempts to send a Schema 2 manifest, falling back to sending a Schema 1 type manifest when it detects that the registry does not support the new version.

Not supporting deployed and commonly used registries isn't an ideal situation :-(

@chanseokoh
Copy link
Member

chanseokoh commented Jul 24, 2018

Duplicate of #601

@chanseokoh chanseokoh marked this as a duplicate of #601 Jul 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants