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

2) sudo yum install docker-ce docker-ce-cli containerd.io

3)   上面2)应该会出错,告诉你container-selinux的版本不够

4)

Installing the Selinux from the Centos repository worked for me:
. Go to http://mirror.centos.org/centos/7/extras/x86_64/Packages/
. Find the latest version for container-selinux i.e. container-selinux-2.21-.el7.noarch.rpm
. Run the following command on your terminal: $ sudo yum install -y http://mirror.centos.org/centos/7/extras/x86_64/Packages/**Add_current_container-selinux_package_here**
. The command should looks like the following $ sudo yum install -y http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.21-1.el7.noarch.rpm

参考:

https://docs.docker.com/install/linux/docker-ce/centos/

https://stackoverflow.com/questions/45272827/docker-ce-on-rhel-requires-container-selinux-2-9/45287245

Install docker to Redhat 7的更多相关文章

  1. Install Docker on Ubuntu

    Install Docker on Ubuntu Estimated reading time: 17 minutes Docker is supported on these Ubuntu oper ...

  2. Ubuntu install Docker

    首先需要说明的是,根据Docker的官方文档,Docker的安装必须在64位的机子上.这里只说明Ubuntu 14.04与16.04,我成功安装成功过Ubuntu 14.04,16.04还没有测试过, ...

  3. Install Docker on Mac OS X(转)

    Install Docker on Mac OS X You can install Docker using Boot2Docker to run docker commands at your c ...

  4. centos Install Docker

    安装必备软件 $ yum -y install iptables iptables-services net-tools vim wget $ wget -P ~ https://github.com ...

  5. install docker swarm on centos

    ref: https://sonnguyen.ws/install-docker-docker-swarm-centos7/ https://hostadvice.com/how-to/how-to- ...

  6. CentOS7 Install Docker(转)

    https://linux.cn/article-4340-1.html CentOS 7 中 Docker 的安装 Docker 软件包已经包括在默认的 CentOS-Extras 软件源里.因此想 ...

  7. Steps to install Docker on Manjaro 16.10--转

    https://manjaro-tutorial.blogspot.com/2016/12/how-to-install-docker-on-manjaro-1610.html Open Termin ...

  8. install docker

    摘要: 我的环境是:CentOS-7-x86_64-Minimal-1511.iso , 也可参考docker官网文档,来安装, url : https://docs.docker.com/engin ...

  9. install docker on centos7

    copy from:https://www.youtube.com/watch?v=pm55BUwQ0iE # Prerequisites - Kernel must be 3.10 at minim ...

随机推荐

  1. Educational Codeforces Round 69 (Rated for Div. 2) D. Yet Another Subarray Problem 背包dp

    D. Yet Another Subarray Problem You are given an array \(a_1, a_2, \dots , a_n\) and two integers \( ...

  2. HikariCP连接池

    1.HikariCP连接池是什么? HikariCP是数据库连接池,而且是号称史上最快的,而且目前来看确实是这样的,SpringBoot2.0也已经采用HikariCP作为默认连接池配置. githu ...

  3. Oracle中如何创建数据库

    Oracle数据库的物理结构与MySQL以及SQLServer有着很大的不同.在使用MySQL或SQLServer时,我们不需要去关心它们的逻辑结构和物理结构. 但是在使用Oracle的时候,我们必须 ...

  4. Loj #2568. 「APIO2016」烟花表演

    Loj #2568. 「APIO2016」烟花表演 题目描述 烟花表演是最引人注目的节日活动之一.在表演中,所有的烟花必须同时爆炸.为了确保安全,烟花被安置在远离开关的位置上,通过一些导火索与开关相连 ...

  5. CSS3 clip裁剪动画

    CSS3 clip裁剪动画 下面是比较简单的例子 <pre><html><head><style type="text/css">i ...

  6. javascript中的发布订阅模式与观察者模式

    这里了解一下JavaScript中的发布订阅模式和观察者模式,观察者模式是24种基础设计模式之一. 设计模式的背景 设计模式并非是软件开发的专业术语,实际上设计模式最早诞生于建筑学. 设计模式的定义是 ...

  7. Spring-@ControllerAdvice 拦截异常并统一处理

    在spring 3.2中,新增了@ControllerAdvice 注解, 可以用于定义@ExceptionHandler.@InitBinder.@ModelAttribute,并应用到所有@Req ...

  8. 云原生生态周报 Vol. 14 | K8s CVE 修复指南

    业界要闻 Mesosphere 公司正式更名为 D2IQ, 关注云原生. Mesosophere 公司日前发布官方声明正式更名为:D2iQ(Day-Two-I-Q),称关注点转向 Kubernetes ...

  9. Django中创建对象的组合

    一.问题背景 在Django中一个表可能是多个表共同合成的对象,比如商品表,用户表,用户购买商品的表,就是这种情况,在这中情况下面我们要添加一条记录到用户购买的商品表中我们该如何才做,此时我们需要获取 ...

  10. C# 学习笔记 多态(二)抽象类

    多态是类的三大特性之一,抽象类又是多态的实现方法之一.抽象类是什么呢,如果把虚方法比作一个盛有纯净水的杯子,那么此时的“纯净水”就是事先定义好的方法,我们可以根据不同的需求来改变杯子中所事先盛放的是“ ...