美文网首页
cenots7安装docker

cenots7安装docker

作者: Fizz_YF | 来源:发表于2024-09-01 12:23 被阅读0次

卸载旧版docker(如果有)

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

安装docker依赖包

yum install -y yum-utils

设置docker仓库

# 这个地址不行,下面直接改为阿里云的
yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo

# 这是阿里云的
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

安装

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

启动等

# 状态
systemctl status docker
# 启动
systemctl start docker
# 关闭
systemctl stop docker
# 开机就启动
systemctl enable docker

相关文章

网友评论

      本文标题:cenots7安装docker

      本文链接:https://www.haomeiwen.com/subject/hnscljtx.html