1.前置条件
Docker开启TCP端口
开启docker apiserver的2375管理端口,本示例在CentOS7环境下。编辑docker.service文件,修改ExecStart参数,添加-H tcp://0.0.0.0:2375 -H unix://var/run/docker.sock
vim ./usr/lib/systemd/system/docker.service
[Service] Type=notify # the default is not to use systemd for cgroups because the delegate issues still # exists and systemd currently does not support the cgroup feature set required # for containers run by docker ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix://var/run/docker.sock ExecReload=/bin/kill -s HUP $MAINPID TimeoutSec=0 RestartSec=2 Restart=always
原文地址:https://www.cnblogs.com/gytangyao/p/10180792.html
时间: 2024-10-11 05:29:08