标签:UNC 系统 comm ble keyword 端口映射 etc ystemd string
Docker 要求 CentOS 系统的内核版本高于 3.10 ,查看本页面的前提条件来验证你的CentOS 版本是否支持 Docker 。通过 uname -r 命令查看你当前的内核版本
uname -r
centos版本
3.10.0-514.el7.x86_64
yum update -y
yum -y install docker
vi /etc/sysconfig/docker
OPTIONS=‘--selinux-enabled=false
systemctl start docker
vi /etc/docker/daemon.json
{
"registry-mirrors": ["https://aj2rgad5.mirror.aliyuncs.com"]
}
vi /lib/systemd/system/docker.service
将第11行的ExecStart=/usr/bin/dockerd,替换为:
ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock -H tcp://0.0.0.0:7654
2375是管理端口,7654是备用端口
在~/.bashrc中写入docker管理端口
export DOCKER_HOST=tcp://0.0.0.0:2375
source ~/.bashrc
systemctl daemon-reload
systemctl restart docker.service
docker run hello-world
Hello from Docker!
This message shows that your installation appears to be working correctly.
标签:UNC 系统 comm ble keyword 端口映射 etc ystemd string
原文地址:https://www.cnblogs.com/pangyangqi/p/9429521.html