-
Notifications
You must be signed in to change notification settings - Fork 76
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Hello,
First of all, thank you very much for this tool!
I'm writing this issue because one of the registry behaviors is not implemented yet. It's not the most common use-case but I wonder if it's planned to be implemented soon or not?
When docker pushes an image, each layer will be uploaded if this is the first time this layer/blob is sent to the registry. But when an image has shared layers that have already been pushed to an A
repository and then a new image on another B
repository is pushed, docker will try to mount
the layer from the A
repository to B
avoiding re-uploading.
This behavior is described in the Cross Repository Blob Mount
section below: https://docker-docs.uclv.cu/registry/spec/api/#pushing-an-image
- Docker client will send this query to mount a layer from
image-A
to the newimage-B
with the common blob ID to mount:
POST /v2/image-B/blobs/uploads/?from=image-A&mount=sha256%3A6b17377d415bc5e55a5a71a28a74139961b94b9f835c9c29852e7658d76c2ab0
- The registry should respond with
201 Created
if the mount is successful otherwise it will return202 Accepted
to re-upload the layer - Currently the serverless-registry (in a wrangler dev environment) reply with
202
and docker will upload again the layer (wich work withdocker push
command). - Some client command (like
docker manifest push
) doesn't handle when the blob mounting doesn't work and crash with the messageerror mounting image-a@sha256:6b17377d415bc5e55a5a71a28a74139961b94b9f835c9c29852e7658d76c2ab0 to localhost:8787/image-b:test
gabivlj
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request