Create a self-generated image source


f_path="registry.tar.gz"
f_name=${f_path##*/}
inner_ip='192.168.63.100'
curl  -u admin:brysjhhrhl356126155165352237656123565615 -o ${f_path} "http://${inner_ip}:50000/remote.php/dav/files/admin/app/${f_name}"

registry_dir='/root/registry'
tar -xzvf registry.tar.gz  ${registry_dir}

docker run -d -p 5000:5000 --restart always --name registry  -v  ${registry_dir}:/var/lib/registry registry


Copy the code

Use a self-built mirror source


self_hub='192.168.164.200:5000'

mkdir -p  /etc/docker/
cat > /etc/docker/daemon.json <<EOF { "log-level": "error", "storage-driver": "overlay2", "insecure-registries": ["${self_hub}"] } EOF

systemctl enable docker
systemctl daemon-reload
systemctl restart docker



# globals.yml and add the following, Where 192.168.1.100:4000 is the IP address and port on which the registry is listening:Vi globals. Yml docker_registry: 192.168.1.100:4000Copy the code