Docker Pull or push from a docker client


Example

When you get a working registry running you can pull or push images on it. For that you need the server.crt file into a special folder on your docker client. The certificate allows you to authenticate with the registry, and then encrypt communication.

Copy server.crt from registry machine into /etc/docker/certs.d/mydomain.com:5000/ on your client machine. And then rename it to ca-certificates.crt : mv /etc/docker/certs.d/mydomain.com:5000/server.crt /etc/docker/certs.d/mydomain.com:5000/ca-certificates.crt

At this point you can pull or push images from your private registry :
PULL : docker pull mydomain.com:5000/nginx or
PUSH :

  1. Get an official image from hub.docker.com : docker pull nginx
  2. Tag this image before pushing into private registry : docker tag IMAGE_ID mydomain.com:5000/nginx (use docker images to get the IMAGE_ID)
  3. Push the image to the registry : docker push mydomain.com:5000/nginx