docker的安装部署

参考docker官网文档:https://docs.docker.com/engine/install/centos/
卸载之前安装的docker

yum remove docker \

docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine

步骤二:安装工具包

 sudo yum install -y yum-utils

设置docker安装地址

 sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo

yum install docker-ce docker-ce-cli containerd.io

启动docker

systemctl start docker

查看docker版本

docker -v

列出本地镜像

 docker images

设置docker开机自启

systemctl start docker

配置docker镜像加速

image.png

image.png

执行如下命令

[root@flower-core /]# sudo mkdir -p /etc/docker
[root@flower-core /]# sudo tee /etc/docker/daemon.json <<-'EOF'

{
"registry-mirrors": ["https://q3pv6zed.mirror.aliyuncs.com"]
}
EOF
{
"registry-mirrors": ["https://q3pv6zed.mirror.aliyuncs.com"]
}
[root@flower-core /]# systemctl daemon-reload
[root@flower-core /]# systemctl restart docker

你可能感兴趣的:(docker的安装部署)