- List item
bash
vim /etc/docker/daemon.json
- 在insecure-registries中添加你的socket(IP+端口号)
bash
{
"bip": "33.33.33.1/24",
"registry-mirrors": ["https://docker.mirrors.ustc.edu.cn/"],
"insecure-registries":["172.17.6.40:8060","10.12.135.238:8060"],
"log-driver":"json-file",
"log-opts": {"max-size":"10m", "max-file":"3"},
"default-ulimits": {
"core": { "Name": "core", "Soft": -1, "Hard": -1 },
"nofile": { "Name": "nofile", "Soft": 65536, "Hard": 65536 },
"nproc": { "Name": "nproc", "Soft": 65536, "Hard": 65536 }
}
}
3.重新加载daemon:
bash
sudo systemctl daemon-reload
4.重启docker
bash
sudo systemctl restart docker