Using Docker on Synology DSM with an HTTP Proxy
This article describes a simple and reliable configuration to allow Docker on Synology DSM to pull images through an HTTP proxy.
The focus is on practical setup, not troubleshooting or proxy internals.
Environment
- Synology NAS (DSM 7.x)
- Docker package (Container Manager / Docker)
- HTTP Proxy reachable from the NAS
1. Configure Docker to Use an HTTP Proxy
On Synology DSM, Docker runs as a systemd service:
pkg-Docker-dockerd.service
To configure Docker to use an HTTP proxy, create a systemd drop-in file.
Create the configuration directory
sudo mkdir -p /etc/systemd/system/pkg-Docker-dockerd.service.d
Create the proxy configuration file
sudo vi /etc/systemd/system/pkg-Docker-dockerd.service.d/http-proxy.conf
Add the following content:
[Service] Environment="HTTP_PROXY=http://<PROXY_HOST>:<PROXY_PORT>" Environment="HTTPS_PROXY=http://<PROXY_HOST>:<PROXY_PORT>" Environment="NO_PROXY=localhost,127.0.0.1,::1,192.168.0.0/16,10.0.0.0/8,172.16.0.0/12"
Replace <PROXY_HOST> and <PROXY_PORT> with the address of your HTTP proxy.
2. Apply the Configuration
Reload systemd and restart Docker:
sudo systemctl daemon-reload sudo systemctl restart pkg-Docker-dockerd.service
3. Pull Docker Images
After restarting Docker, images can be pulled normally:
docker pull alpine:latest
Recent Comments