Foreman[1], the upstream project for Red Hat's Satellite-6, uses pulp[2] as
its backend service for managing content such as RPMs, files, and container
images. Pulp provides a limited registry API through the add on crane[3].

What I am doing is implementing more of the registry v2 API directly
against the foreman server, redirecting to crane in some cases and directly
to pulp in other cases. By doing this it allows "docker login" and full
search in the context of foreman's users and permissions. As part of this
the "docker push" API can also be implemented. This is where I need some
help.

Following the docs here[4] I have "skopeo copy" to the "docker:" endpoint
working. However, "docker push" (docker version 1.12.6 if relevant) just
enters a loop of GET /v2/token, POST /v2/name/blobs/upload, GET /v2/token,
PATCH /v2/name/blobs/uploads/uuid. The call to PATCH includes the blob in
the request body, which I save, but I cannot figure out what docker expects
in either the response status, response headers, or the response body.

If anyone can assist in guiding me, I would appreciate the pointers. I am
not adept at reading go code, nor am I sure where to find the docker source
(links welcome). Needless to say, I prefer skopeo. :)

Side note, foreman will soon support uploading the output of "skopeo copy
dir:" for full disconnected container image support. Thanks to everyone
that made that possible!


[1] https://theforeman.org/plugins/katello/
[2] https://pulpproject.org/
[3] https://docs.pulpproject.org/plugins/crane/index.html
[4] https://docs.docker.com/registry/spec/api/

Reply via email to