banner
lca

lca

真正的不自由,是在自己的心中设下牢笼。

How to pull Docker images after being blocked

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:

image

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

image

Before setting the proxy:

image

After setting the proxy:

image

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

Committed to providing stable, reliable, and secure container image services connecting the whole world

[https://getdocker.quickso.cn/](Docker one-click installation script)

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.