docker-archive / docker-registry

This is **DEPRECATED**! Please go to https://github.com/docker/distribution
Apache License 2.0
2.88k stars 876 forks source link

Push Manifest by http api v2 failed #1097

Open icedir opened 7 years ago

icedir commented 7 years ago

When i push a images by http api v2 ,i failed. I obey the https://docs.docker.com/registry/spec/api/

Anyone help me to know what's i'm wrong? This is my process order:

  1. POST /v2/<name>/blobs/uploads/ > get uuid and Location
  2. RUN linux shell docker save <image> >get a tarfile of my image
  3. RUN linux shell sha256sum tarfile >get my tarfile digest
  4. PUT /v2/<name>/blobs/uploads/<uuid>?digest=<digest> >use step 3 generated digest upload i use curl -T tarfile -X PUT /v2/<name>/blobs/uploads/<uuid>?digest=<digest>
  5. PUT /v2/<name>/manifests/<reference> >get a ERROR ,MANIFEST_INVALID manifest invalid,but i look the registry file system,my image was upload success only not has a manifest in the folder named _manifest

My question: when i upload a new image to registry ,where can i get the right manifest content?

PS:My english is not good,thx for your read