docker---centos上的安装配置

docker—centos上的安装配置

本文章参考,官网Install Docker Engine on CentOS

1.Docker对于centos的系统要求

To install Docker Engine, you need a maintained version of one of the following CentOS versions:
(要安装Docker Engine,您需要以下CentOS版本之一的维护版本:)

  • CentOS 7
  • CentOS 8 (stream)
  • CentOS 9 (stream)
2.Docker卸载

Older versions of Docker went by the names of docker or docker-engine. Uninstall any such older versions before attempting to install a new version, along with associated dependencies:
(旧版本的Docker被称为Docker或Docker引擎。在尝试安装新版本之前,卸载任何此类旧版本以及相关的依赖项)

yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine
3.Docker安装
  1. docker依赖安装
yum -y install gcc 
yum -y install gcc-c++ 
yum install  -y   yum-utils
  1. docker镜像仓库配置
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

注意:以下为官网配置,但国内网络限制,不可使用
yum-config-manager
–add-repo
https://download.docker.com/linux/centos/docker-ce.repo

  1. 更新yum软件包索引
yum makecache fast
  1. docker安装
yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
  1. docker的启动与查看
启动:systemctl start docker
检查:systemctl start docker

docker version

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值