Frank Chung
Jan 24 · 1 min read

Step 1. Run the local repository on server side

$ docker run -d -p 5000:5000 --restart=always --name registry registry:2

Step 2. Try to push and pull images from server side

$ docker tag alpine localhost:5000/alpine
$ docker push localhost:5000/alpine

Then you can check the local repository

$ curl http://localhost:5000/v2/_catalog{"repositories":["alpine"]}

Step 3. Try to push and pull images from remote client

For mac client, update the secure setting in docker preference:

For linux client, update the daemon.json:

$ echo '{ "insecure-registries":    ["xxx.xxx.xxx.xxx:5000"] }' > /etc/docker/daemon.json$ systemctl restart docker

Now we can try to push and pull images from remote server:

$ docker tag alpine xxx.xxx.xxx.xxx:5000/alpine
$ docker push xxx.xxx.xxx.xxx:5000/alpine

Good Luck~

DeepQ Research Engineering Blog

Technical sharing by HTC research engineering team.

Frank Chung

Written by

DeepQ Research Engineering Blog

Technical sharing by HTC research engineering team.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade