pheonix
pheonix

Reputation: 73

Docker api: push an image to docker hub private repository

I can create a docker registry on 5000 port mapped to 5000 port on my local system. docker configuration file changed to --insecure-registry localhost:5000 to make the connection insecure. How can I push images to my private repo using docker api command.

Upvotes: 0

Views: 801

Answers (1)

paimpozhil
paimpozhil

Reputation: 176

For API I guess you can use this

Push an image on the registry POST /images/(name)/push

Example request:

POST /images/registry.acme.com:5000/test/push HTTP/1.1
Query Parameters:

tag – The tag to associate with the image on the registry. This is optional.

Ref: https://docs.docker.com/reference/api/docker_remote_api_v1.19/

Upvotes: 1

Related Questions