If you have some docker services running on your UGREEN NAS you might want to host an own docker registry in your local network as well for pushing self-created images. For this purpose docker provides a container registry image on docker hub. 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 without TLS you need to set the "insecure-registries":["NAS_IP:REGISTRY_PORT"] property to the docker configuration. You need to set the entry on client and server side to be able to docker pull and docker pushsuccessfully.

For the solution I assume that there is already a registry container running. If this is not the case, start a registry container first by either

  • Run this command via ssh:
sudo docker run -d -p REGISTRY_PORT:5000 --name registry-1 --restart always registry
  • Or use the Docker application in UGOS for running an equivalent container

Enable Pulling from registry

Connect to your UGREEN NAS using SSH. If you don’t know how to do that, see this blog post.

  1. Open the daemon.json
sudo vim /etc/docker/daemon.json
  1. Add "insecure-registries":["NAS_IP:REGISTRY_PORT"] to the daemon.jsonNAS-IP:REGISTRY-PORT needs to be replaced with the address of the private registry, e.g. 192.168.1.2:5000:
{
    "data-root": "/volume1/@docker",
    "insecure-registries": ["NAS_IP:REGISTRY_PORT"]
}
  1. Restart the docker daemon
sudo systemctl restart docker

Enable pushing to registry

  1. Start Docker Desktop.
  2. Press Cmd + , to open the settings.
  3. Switch to Docker Engine menu entry.
  4. Add the insecure-registries entry to the given daemon configuration:
{
  "builder": {
    "gc": {
      "defaultKeepStorage": "20GB",
      "enabled": true
    }
  },
  "experimental": false,
  "insecure-registries": ["NAS_IP:REGISTRY_PORT"]
}
  1. Restart the docker daemon to affect the changes by clicking on Apply & restart button.

Eingeordnet in:

Linux, UGOS PRO,