After setting up a custom docker registry on Nexus OSS, you might want to connect your docker client to it. It is very easy to do so, I’ll explain how.
First, you’ll want to fetch the URL of the repository. In my case it is http://192.168.0.10:8181
(I know, it’s not secure).
Next, add it to the docker configuration file, called /etc/docker/daemon.json
{
"insecure-registries": ["http://192.168.0.10:8181"],
"registry-mirrors": ["http://192.168.0.10:8181"]
}
Since this is a non-https connector, I also have to add it to the insecure-registries block. If your repository is running on HTTPS, that is not needed.
Finally, restart your docker daemon and pull an image, it will be fetched from your own repository!