After the domestic Docker source was taken down, if you want to pull images in the LAN without using a proxy, you really can't pull them down. The CTFD platform you built yourself needs to pull images from DockerHub, so you need to set up a proxy.
Environment:
- The Ubuntu host in the LAN needs to pull images with Docker, not the local machine
- Local IP: 192.168.10.237
If pulling images with Docker on the local machine, just enable tun mode in Clash.
The Clash proxy is set up as follows
Modify the daemon.json file
sudo vi /etc/docker/daemon.json
Add the following content, using the official mirror
{
"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 up the proxy
After setting up the proxy
Reference: