Using the Docker API to Access the Private Registry

What is the syntax to direct an image to a private registry?

From the documentation, I would expect the below to work:

curl -X POST -i "http://localhost:2375/images/localhost:5000/oillio/my_app:1.0-SNAPSHOT/push"

I can use the CLI for this:

docker push localhost:5000/oillio/my_app:1.0-SNAPSHOT

It works great. But I can't figure out which syntax should do this from the API. When I try the above, I get a 500 status response with the text "EOF"

+1
source share
2 answers

The tag should be as a parameter, not inside the URL:

/images/<imageName>/push?tag=<tadName>

Please note that you will also need a heading X-Registry-Auth.

+2
source

working example:

curl -X POST -H "X-Registry-Auth:787f5fe5195c40ef924ac8d67948e15a" http://172.19.32.116:8833/images/172.19.32.116:5000/test7/push
0

All Articles