After the domestic Docker source was removed, if you want to pull images in a local area network without using a proxy, it really cannot be done. The CTFD platform you built needs to pull images from Docker Hub, so you need to set up a proxy.
Environment:
- An Ubuntu host in the local area network needs to pull Docker images, not the local machine
- Local machine IP: 192.168.10.237
If the local machine's Docker pulls images, just enable the tun mode in Clash.
Clash proxy settings are as follows:
Modify the daemon.json file:
sudo vi /etc/docker/daemon.json
Add the following content to use the official image:
{
"registry-mirrors": [
"https://hub.docker.com/"]
}
Create a proxy.conf file:
mkdir -p /etc/systemd/system/docker.service.d
cd /etc/systemd/system/docker.service.d
touch proxy.conf
sudo vi /etc/systemd/system/docker.service.d/proxy.conf
Add the following content:
[Service]
Environment="HTTP_PROXY=http://192.168.10.237:7890"
Environment="HTTPS_PROXY=http://192.168.10.237:7890"
Restart the Docker service:
# Load the changed configuration
systemctl daemon-reload
# Restart the Docker service
systemctl restart docker
Check if the configuration is effective:
systemctl show --property=Environment docker
Before setting the proxy:
After setting the proxy:
Reference:
https://learnku.com/articles/87396
other#
{
"registry-mirrors": [
"https://docker.1panel.dev"
]
}
Or add this address as a prefix when pulling images:
docker pull docker.1panel.dev/yangchuansheng/derper:latest
Temporary solution for pulling Docker images that is not a permanent fix
[https://getdocker.quickso.cn/](Docker one-click installation script)