If you have installed a local docker registry without signed SSL certificates, the docker daemon will need to be started in a way to allow connection in insecure mode. For details see this note from Docker. In this guide I will show you how to configure VMware Photon OS to connect to a registry in insecure mode. Please note this is only advised for Development and testing environments. For added security you should always setup you clients and registry in secure mode.
Open an SSH session and login to your Photon OS VM. We will configure Docker to allow connecting to an insecure registry since we used HTTP for our registry server and did not setup signed certs, use vi editor to create a file /etc/default/docker
Click i and then enter the following to point to the host name or ip and port (if other than port 80) then click the esc key, then hold shift and pres ZZ to save the file
Now start Docker with the following command
Note: If docker was already running just type systemctl restart docker
Now login to the registry with the following and use the user and password you setup in your registry
Now pull an image from the Public DockerHub registry
docker pull vmwarecna/nginx
docker tag vmwarecna/nginx reg.corp.local/library/myimage
docker push reg.corp.local/library/myimage
You are now setup to push and pull images to your local registry in insecure mode. Enjoy!