curl -s https://raw.githubusercontent.com/aiminickwong/cecos-caas/master/cecos-caas-deploy | bash
curl -s https://raw.githubusercontent.com/aiminickwong/cecos-caas/master/cecos-caas-deploy | bash -s clean
curl -s https://raw.githubusercontent.com/aiminickwong/cecos-caas/master/cecos-caas-agent-deploy | bash
如果您还未部署主机为 Docker Swarm 集群模式,
请先执行命令 “ docker swarm init ” 初始您的节点为 Docker Swarm 集群模式
注:修改daemon.json文件后需要执行命令
systemctl daemon-reload ; systemctl restart docker.service
才能生效
{
"registry-mirrors": ["https://registry.docker-cn.com"]
}
{
"insecure-registries" : ["yourPrivateRegistryIPaddress:5000"]
}
{
"hosts": ["fd://", "tcp://0.0.0.0:2375"],
}
开启接受远程连接模式后无法启动docker服务,提示以下问题( syslog 系统日志):
unable to configure the Docker daemon with file /etc/docker/daemon.json: the following directives are specified both as a flag and in the configuration file: hosts: (from flag: [fd://], from file: [tcp://0.0.0.0:2375, unix:///var/run/docker.socket])
解决办法:
修改 '/lib/systemd/system/docker.service' 文件
然后执行命令
systemctl daemon-reload ; systemctl restart docker.service'
即可修复问题
修改前:
# ...省略
# 关键行
ExecStart=/usr/bin/dockerd -H fd://
# ...省略
修改后:
# ...省略
# 关键行
# ExecStart=/usr/bin/dockerd -H fd://
ExecStart=/usr/bin/dockerd
# ...省略
注意:部分系统 '/lib/systemd/system/docker.service' 文件的路径可能与上述路径不一样,请根据实际的文件路径修改文件。
{
"registry-mirrors": ["https://registry.docker-cn.com"],
"hosts": ["fd://", "tcp://0.0.0.0:2375"],
"insecure-registries" : ["192.168.100.100:5000"]
}