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 18.09,socket的描述 "fd://" 已经更改为 "unix://"
上述配置应修改为
{
"hosts": ["unix://", "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"]
}
如果是18.09则是
{
"registry-mirrors": ["https://registry.docker-cn.com"],
"hosts": ["unix://", "tcp://0.0.0.0:2375"],
"insecure-registries" : ["192.168.100.100:5000"]
}
WARNING: No memory limit support
修改/etc/default/grub
GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"
然后执行
update-grub 或者 update-grub2
重启即可
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。