Skip to content

problem while downloading blobs named using set-alias #3

Closed

Description

@twanc

LAYERSDIG=""

for LAYERDIGEST in dxf get-alias ubuntu latest; do
LAYERSDIG+="${LAYERDIGEST} "
done

dxf set-alias ubuntu releaseN ${LAYERSDIG}

$ docker pull localhost:5000/ubuntu:releaseN
releaseN: Pulling from ubuntu
87192bdbe00f: Already exists
28e09fddaacb: Already exists
7e15ce58ccb2: Already exists
a3ed95caeb02: Already exists
invalid character '\x1f' looking for beginning of value

Activity

  1. twanc commented on Apr 10, 2016

    @twanc
    Author

    it looks it is by design due to docker registry design, am I right? :)

  2. davedoesdev commented on Apr 10, 2016

    @davedoesdev
    Owner

    Trying to repro this but I can't even get it to auth to Docker Hub at the moment :(

  3. davedoesdev commented on Apr 10, 2016

    @davedoesdev
    Owner

    OK now I pulled the latest registry:2, I'm getting test failures.
    Looks like Docker changed things around again. I did update to schema v2 but maybe it changed again :(

  4. davedoesdev commented on Apr 10, 2016

    @davedoesdev
    Owner

    Ah no, scratch that the tests pass, I had a debugging line affecting the results.
    So back to Docker Hub auth...

  5. davedoesdev commented on Apr 10, 2016

    @davedoesdev
    Owner

    I can auth (even as anon) if I specify library/ubuntu instead of ubuntu.

  6. davedoesdev commented on Apr 10, 2016

    @davedoesdev
    Owner

    @twanc are you using Docker Hub here or a private registry?
    dxf really expects to be reading something it's written. It doesn't handle manifest lists, for example.

  7. twanc commented on Apr 11, 2016

    @twanc
    Author

    @davedoesdev
    Thank you for response. I am using private docker registry deployed as following:
    docker run -d -p 5000:5000 --restart=always --name registry registry:2

    Afterwards I set shell environment as following:
    export DXF_HOST=localhost:5000
    export DXF_INSECURE=1

    I checked deeper this case, especially logs from docker registry. Noticed the problem is while docker registry translating v2 manifest to v1 version because it is gathered via name - not the digest.
    Anyway I noticed also it is all about manifest digest in config section. I changed this digest to the original once (for latest tag) and there is no problem to PUT it and download image at all.

  8. davedoesdev commented on Apr 11, 2016

    @davedoesdev
    Owner

    OK thanks. I'd like to look a bit deeper into this too. How did you upload Ubuntu image to the local registry?

  9. davedoesdev commented on Apr 11, 2016

    @davedoesdev
    Owner
    docker tag ubuntu localhost:5000/ubuntu
    docker push localhost:5000/ubuntu

    ?

  10. twanc commented on Apr 11, 2016

    @twanc
    Author

    yes, exacly

  11. twanc commented on Apr 11, 2016

    @twanc
    Author

    My docker client version:
    tomek@wro182:~/cloud-init-template$ docker --version
    Docker version 1.10.3, build 20f81dd

  12. davedoesdev commented on Apr 11, 2016

    @davedoesdev
    Owner

    OK I repro'd. Yes the cause is the manifest, but not because it's converting.
    Schema 2 (https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-2.md) has a config section which is supposed to contain the container config.
    dxf is just using the registry as a blob store, it doesn't even know about containers. But the registry wants this section.
    So to give it something, instead of an application/vnd.docker.container.image.v1+json to describe a container config, dxf just gives it an application/octet-stream (actually, points to the first layer itself).
    docker pull will be trying to read that file as application/vnd.docker.container.image.v1+json and failing.

  13. davedoesdev commented on Apr 11, 2016

    @davedoesdev
    Owner

    There's not much I can do here - I don't really want to start defining container image definitions just to store blobs.

  14. twanc commented on Apr 11, 2016

    @twanc
    Author

    yes, thats right, thanks for answer :)

  15. davedoesdev commented on Apr 11, 2016

    @davedoesdev
    Owner

    No problem - I appreciate you reporting it and helping figure it out.

  16. mrueg commented on Nov 24, 2017

    @mrueg
    Contributor

    @davedoesdev I got bitten by this issue as well, as I was planning to use dxf to forward images between registries.
    Can you add a "caveat" to the readme that this is currently not possible?

  17. davedoesdev commented on Nov 26, 2017

    @davedoesdev
    Owner

    Nice suggestion - done and thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions