If you have some docker services running on your Synology NAS you might want to host a own docker registry in your local network as well for pushing own images. For this purpose docker provides an own container registry image. Running the registry on your NAS inside the local network does not necessarily need a TLS communication. But docker requires a TLS communication between a registry and your docker instance by default. To allow the communication wiothout TLS you need to set the "insecure-registries":["<host>:<port>"]
to the docker configuration. You need to set the entry on client and server side to be able to docker pull
and docker push
successfully.
For the solution I assume that there is already a registry container running. If this is not the case, start a registry container first.
Enable Pulling from registry
Connect to your Synology NAS using SSH. If you don’t know how to do that, see this blog post.
- Add
"insecure-registries":["<host>:<port>"]
to the dockerd.json
sudo vi /var/packages/ContainerManager/etc/dockerd.json
<host>:<port>
needs to be replaced with the address of the private registry.
- Then restart the docker daemon
sudo systemctl restart pkg-ContainerManager-dockerd.service
NOTE
Maybe the service name will change in future. As long as docker is contained in the service name you should be able to find by
systemctl list-units --type=service --all | grep -i docker
In case the location of the dockerd.json does not succeed check if the folder ContainerManager has changed its name.
Enable pushing to registry
Open Docker Desktop and insert the JSON as well like described in the picture.