Docker Docker private/secure registry with API v2 Pull or push from a docker client

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

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


Got any Docker Question?