Docker CE
  1. Install yum-utils, which provides the yum-config-manager utility:

    $ sudo yum install -y yum-utils
  2. Use the following command to set up the stable repository:

    $ sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo
  3. Optional: Enable the edge repository. This repository is included in the docker.repo file above but is disabled by default. You can enable it alongside the stable repository.

    $ sudo yum-config-manager --enable docker-ce-edge

    You can disable the edge repository by running the yum-config-manager command with the --disable flag. To re-enable it, use the --enable flag. The following command disables the edge repository.

    $ sudo yum-config-manager --disable docker-ce-edge

    Learn about stable and edge builds.

INSTALL DOCKER

  1. Update the yum package index.

    $ sudo yum makecache fast

    If this is the first time you have refreshed the package index since adding the Docker repositories, you will be prompted to accept the GPG key, and the key’s fingerprint will be shown. Verify that the fingerprint is correct, and if so, accept the key.

    Docker Edition Fingerprint
    Docker CE 060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35
    Docker EE DD91 1E99 5A64 A202 E859 07D6 BC14 F10B 6D08 5F96
  2. Install the latest version of Docker, or go to the next step to install a specific version.

    Docker Edition Command
    Docker CE sudo yum install docker-ce
    Docker EE sudo yum install docker-ee

    Warning: If you have multiple Docker repositories enabled, installing or updating without specifying a version in the yum install or yum update command will always install the highest possible version, which may not be appropriate for your stability needs.

  3. On production systems, you should install a specific version of Docker instead of always using the latest. List the available versions. This example uses the sort -r command to sort the results by version number, highest to lowest, and is truncated.

    Note: This yum list command only shows binary packages. To show source packages as well, omit the .x86_64 from the package name.

    $ yum list docker-ce.x86_64  --showduplicates |sort -r
    
    docker-ce.x86_64  17.03.0.el7                               docker-ce-stable

    The contents of the list depend upon which repositories are enabled, and will be specific to your version of CentOS (indicated by the .el7 suffix on the version, in this example). Choose a specific version to install. The second column is the version string. The third column is the repository name, which indicates which repository the package is from and by extension its stability level. To install a specific version, append the version string to the package name and separate them by a hyphen (-):

    Docker Edition Command
    Docker CE sudo yum install docker-ce-<VERSION>
    Docker EE sudo yum install docker-ee-<VERSION>
  4. Start Docker.

    $ sudo systemctl start docker
  5. Verify that docker is installed correctly by running the hello-world image.

    $ sudo docker run hello-world

    This command downloads a test image and runs it in a container. When the container runs, it prints an informational message and exits.

在CentOS 7 上安装docker的更多相关文章

  1. 在Centos 7上安装Docker

    在Centos 7上安装Docker 1.docker介绍 docker是类似于vmware的虚拟化软件,可以开发.容纳.运行应用程序的平台,在容器中安全的隔离运行应用程序. 2.Docker引擎 D ...

  2. Install Docker Engine on CentOS 在CentOS 7 上安装Docker

    Install Docker Engine on CentOS OS Requirements 系统要求 To install Docker Engine,you need a maintained ...

  3. 如何在 CentOS 7 上安装 Docker

    Docker 是一个开源工具,它可以让创建和管理 Linux 容器变得简单.容器就像是轻量级的虚拟机,并且可以以毫秒级的速度来启动或停止.Docker 帮助系统管理员和程序员在容器中开发应用程序,并且 ...

  4. 【docker】linux系统centOS 7上安装docker

    要求: 一个centOS 7系统  虚拟就上安装CentOS 7步骤 本文操作在本机上使用xshell连接虚拟机上的centOS 7进行操作 1.Docker 要求 CentOS 系统的内核版本高于 ...

  5. CentOS 7上安装Docker 1.8

    Docker支持运行在以下CentOS版本: CentOS 7.X 安装在二进制兼容的EL7版本如 Scientific Linux也是可能成功的,但是Docker没有测试过并且不官方支持. 此文带你 ...

  6. 在CentOS 7上安装Docker环境

    官网文档:https://docs.docker.com/engine/installation/linux/centos/ ,本文大部分是照搬官方文档写的,如果你英文还不错,那么就直接移步官方文档吧 ...

  7. CentOS 7上安装Docker

    目录 安装步骤 1.查看Docker的版本 ​ 2.安装 Docker 3.启动Docker 4.设置为开启启动 5.查看Docker安装信息 6.使用Docker 中国加速器 安装步骤 安装操作系统 ...

  8. 在centos linux上安装docker

    前置条件 64-bit 系统 kernel 3.10+ 1.检查内核版本,返回的值大于3.10即可. $ uname -r 2.确保yum是最新的 $ yum update 3.安装 Docker y ...

  9. CentOS 8上安装Docker

    前言 这几天,想玩玩docker,方便漏洞复现,我去学docker搭建了,感觉不错,挺方便的 安装步骤: 1.下载docker-ce的repo curl https://download.docker ...

随机推荐

  1. Java面试系列之HashMap大扫盲汇总

    PS:整理的稍微有点急,不足之处,望各路道友指正,List相关可以查看前一篇随笔! HashMap的工作原理是近年来常见的Java面试题,几乎每个Java程序员都知道HashMap,都知道哪里要用Ha ...

  2. 花生壳DDNS为何不支持LetsEncrypt申请

    Inspired by Let's Encrypt Community , thx to sahsanu, jsha, and orzorc. 开端 Lets Encrypt 是一款免费的网站 SSL ...

  3. Centos7.2下基于Nginx+Keepalived搭建高可用负载均衡(一.基于Keepalived搭建HA体系)

    说明 本文只为方便日后查阅,不对一些概念再做赘述,网上都有很多明确的解释,也请大家先了解相关概念. 两台搭建HA的服务器是华为云上的ECS(不要忘记开通VPC,保证我们的服务器都处在一个内网环境),由 ...

  4. HTML的基本标签及语法

    一.HTML基本标签head部分 HTML文档的基本结构 <!DOCTYPE html> <html> <head> <meta charset=" ...

  5. 团队作业8——第二次项目冲刺(Beta阶段)日志集合处

    Beta版本冲刺 http://www.cnblogs.com/vviane1/p/6886049.html 第一天(2017.05.22) http://www.cnblogs.com/vviane ...

  6. 微信小程序wx.navigateTo层叠5次限制,特殊情况的建议

    小程序页面的实例使用栈的数据结构存储,栈内元素最多5个(换一种方式说,就是用户最多能点击5次返回),微信小程序能在栈中相对高层某个页面调用其他相对低层的页面实例的方法. 小程序三种页面跳转API 的区 ...

  7. 201521123010 《Java程序设计》第5周学习总结

    1. 本周学习总结 1.1 尝试使用思维导图总结有关多态与接口的知识点. 2. 书面作业 作业参考文件下载 ① 代码阅读:Child压缩包内源代码 1.1 com.parent包中Child.java ...

  8. 201521123042《Java程序》第二周总结

    1. 本周学习总结 了解枚举类型的使用方法. 学会使用ArrayList替换数组,并且学会运用相关函数,例如: strList.contains(str)(判断数组中是否包含字符串str,包含则返回t ...

  9. 201521123007《Java程序设计》第9周学习总结

    1. 本周学习总结 1.1 以你喜欢的方式(思维导图或其他)归纳总结异常相关内容. 2. 书面作业 本次PTA作业题集异常 1. 常用异常 题目5-1 1.1 截图你的提交结果(出现学号) 1.2 自 ...

  10. 201521123012 《Java程序设计》第十周学习总结

    1. 本周学习总结 1.1 以你喜欢的方式(思维导图或其他)归纳总结异常与多线程相关内容. 2. 书面作业 1.本次PTA作业题集异常.多线程 finally 题目4-2 1.1 截图你的提交结果(出 ...