After the domestic Docker source was removed, if you want to pull images in the local area network without a proxy, it really can't be done. The self-built CTFD platform needs to pull images from Docker Hub, so you need to set up a proxy.
Environment:
- The Ubuntu host in the local area network needs to pull images with Docker, not the local machine
- Local machine IP: 192.168.10.237
If it's the local machine pulling images with Docker, 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 takes effect
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 the image
docker pull docker.1panel.dev/yangchuansheng/derper:latest
Temporary solution for pulling Docker images that is not a one-time fix
[https://getdocker.quickso.cn/](One-click Docker installation script)