zoukankan      html  css  js  c++  java
  • Centos7安装docker(报错:container-selinux >= 2:2.74)

    step 1: 安装必要的一些系统工具

    yum install -y yum-utils device-mapper-persistent-data lvm2

    Step 2: 添加软件源信息

    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
    在这里插入图片描述

    Step 3: 安装 Docker-CE

    yum -y install docker-ce
    在这里插入图片描述

    Step 4: 开启Docker服务

    systemctl restart docker
    systemctl enable docker

    安装docker时报container-selinux >= 2.9错误

    如果安装docker时出现了以下错误
    Error: Package: containerd.io-1.2.13-3.2.el7.x86_64 (docker-ce-stable)
    Requires: container-selinux >= 2:2.74
    Error: Package: 3:docker-ce-19.03.12-3.el7.x86_64 (docker-ce-stable)
    Requires: container-selinux >= 2:2.74
    You could try using --skip-broken to work around the problem
    You could try running: rpm -Va --nofiles --nodigest

    这个报错是container-selinux版本低或者是没安装的原因
    yum 安装container-selinux 一般的yum源又找不到这个包
    需要安装epel源 才能yum安装container-selinux
    然后在安装docker-ce就可以了。

    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    yum install epel-release
    yum makecache
    yum install container-selinux

  • 相关阅读:
    (C#)TreeView控件综合实例
    C#语言命名规则
    C#基础全接触
    (C#)GDI+简单绘图画矩形
    (C#)GDI+简单绘图画曲线
    C#拆箱与装箱之代码优化
    (C#)GDI+绘图之鼠标移动画图
    近期学习计划
    MS_SQL_杂记(一)
    别在迷恋正则表达式解析html了,好吗?
  • 原文地址:https://www.cnblogs.com/Ricardo-W/p/14872210.html
Copyright © 2011-2022 走看看