docker-ce安装与配置

1、下载docker-ce

yum -y install wget

cd /etc/yum.repos.d

wget https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

yum makecache fast

2、安装docker社区版本

yum -y install docker-ce

mkdir -p /app/docker

mkdir -p /etc/docker

3、配置加速器

vi /etc/docker/daemon.json

{"registry-mirrors": ["https://a14c78qe.mirror.aliyuncs.com"],

"live-restore": false,

"insecure-registries": [

"reg.pinming.org"

]

}

4、修改docker启动服务

mkdir -p /etc/systemd/system/docker.service.d/

vi /etc/systemd/system/docker.service.d/override.conf

[Service]

ExecStart=

ExecStart=/usr/bin/dockerd --graph=/app/docker -H 0.0.0.0:2375 -H unix:///var/run/docker.sock $DOCKER_NETWORK_OPTIONS

5、docker启动

systemctl daemon-reload

systemctl enable docker

systemctl start docker

systemctl status docker

点赞

发表评论

电子邮件地址不会被公开。必填项已用 * 标注