Centos7 安装 docker-ce
本文参考官网地址:https://docs.docker.com/install/linux/docker-ce/centos/#os-requirements
1、卸载旧版本的docker
$ sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-selinux \
docker-engine-selinux \
docker-engine
2、安装依赖的工具
$ sudo yum install -y yum-utils \
device-mapper-persistent-data \
lvm2
yum-utils 提供了 yum-config-manager 功能,该功能后边会用到
device-mapper-persistent-data 和lvm2 是 devicemapper所需的依赖,devicemapper可以理解为一种docker用来存放容器和镜像的技术。
3、添加docker yum源,这时用到了 yum-config-manager
$ sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
4、开启刚才下载的yum源
$ sudo yum-config-manager --enable docker-ce-edge
$ sudo yum-config-manager --enable docker-ce-test
第三步下载下来的repo中已经包含了edge 和 test 仓库,但是默认是关闭的,所以需要我们手动开启,我们也可以用下边的命令来关闭它们
$ sudo yum-config-manager --disable docker-ce-edge
5、安装docker
你可以通过以下命令安装最新版的docker:
$ sudo yum install docker-ce
也可以挑选一个特定的版本:
先列出所有可选版本
[root@MiWiFi-R3L-srv proc]# yum list docker-ce --showduplicates | sort -r Repodata is over weeks old. Install yum-cron? Or run: yum makecache fast
* updates: mirrors..com
Loaded plugins: fastestmirror
Installed Packages
* extras: mirrors.cn99.com
docker-ce.x86_64 17.12..ce-.el7.centos docker-ce-stable
docker-ce.x86_64 17.09.1.ce-.el7.centos docker-ce-stable
docker-ce.x86_64 17.09..ce-.el7.centos installed
docker-ce.x86_64 17.09..ce-.el7.centos docker-ce-stable
docker-ce.x86_64 17.06..ce-.el7.centos docker-ce-stable
docker-ce.x86_64 17.06..ce-.el7.centos docker-ce-stable
docker-ce.x86_64 17.06..ce-.el7.centos docker-ce-stable
docker-ce.x86_64 17.03..ce-.el7.centos docker-ce-stable
docker-ce.x86_64 17.03..ce-.el7.centos docker-ce-stable
docker-ce.x86_64 17.03..ce-.el7.centos docker-ce-stable
如上文,已经列出了可用版本,我们选择所需要的版本,列表中第二列是版本号,第三列是package名
这里需要拼一下软件名,使用图中标红位置的字符串“docker-ce”和“17.09.1.ce”,再加上一个“-”,即可拼成。
比如我们要装17.09.1版的,那么软件名就是docker-ce-17.09.1.ce
官网原文(嘟嘟嘟一堆,又是可以使用全名,又是至少要到什么位置……不看也罢):
The contents of the list depend upon which repositories are enabled, and are 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. You can use the entire version string, but you need to include at least to the first hyphen.
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 (-).
$ sudo yum install <你刚才拼出来的名称>
6、开启docker守护线程(服务端)
$ sudo systemctl start docker
7、跑个image试一下
$ sudo docker run hello-world
Centos7 安装 docker-ce的更多相关文章
- Centos7安装Docker CE
每次安装Docker都要去找文档,或者每次安装的都不一样,还是要好好管理自己的这些东西,下次用的时候可以省很多的时间 Docker的早期版本称为docker或docker-engine:现在的 ...
- CentOS7 安装 Docker CE步骤
准备工作 系统要求 Docker CE 支持 64 位版本 CentOS 7,并且要求内核版本不低于 3.10. CentOS 7 满足最低内核的要求,但由于内核版本比较低,部分功能(如 overla ...
- Centos7 安装docker ce
一. 安装docker 1.升级rpm包 yum -y update 2. 通过命令设置Docker CE 资源库: yum install -y yum-utils yum-config-manag ...
- 在centos7上安装Docker CE
Docker CE的基本安装 https://docs.docker.com/engine/installation/linux/docker-ce/centos/ 一.系统要求 1.安装Docker ...
- centos7 下安装Docker CE
前提条件 操作系统要求 要保证centos-extrasrepository开启(enabled).默认处于开启状态. 推荐使用overlay2存储驱动 卸载老版本 $ sudo yum remove ...
- CentOS7 下 yum 安装 Docker CE
前言 Docker 使用越来越多,安装也很简单,本次记录一下基本的步骤. Docker 目前支持 CentOS 7 及以后的版本,内核要求至少为 3.10. Docker 官网有安装步骤,本文只是记录 ...
- Docker进阶之四:centos7安装docker
centos7.6 安装docker 参考:https://docs.docker.com/install/linux/docker-ce/centos/ 一.存在老版本先删除 yum remove ...
- centos7 部署 docker ce
=============================================== 2019/4/9_第1次修改 ccb_warlock === ...
- 【运维技术】VM虚拟机上使用centos7安装docker启动gogs服务教程【含B站视频教程】
VM虚拟机上使用centos7安装docker启动gogs服务视频教程 BiliBili视频教程链接飞机票,点我 使用VMware Workstation安装Centos7 MinMal系统 第一步: ...
- ubuntu16.04安装docker CE
如需开始在 Ubuntu 上使用 Docker CE,请确保您满足先决条件,然后再安装 Docker. 如需安装 Docker 企业版 (Docker EE),请转至获取适用于 Ubuntu 的 Do ...
随机推荐
- python模块uuid产生唯一id
使用版本4:uuid4就可以了 UUID4缺点:糟糕的随机数发生器使得它更有可能发生碰撞,但是概率真的很小 UUID1缺点:暴露隐私 If all you want is a unique ID, y ...
- 在SqlServer 中解析JSON数据 [parseJSON] 函数 数据库中 解析JSON
使用如下: SELECT * FROM parseJSON('{ "联系人": { "姓名": "huang", "网名" ...
- JVM的内存区域划分(转)
原文链接:JVM的内存区域划分 JVM的内存区域划分 学过C语言的朋友都知道C编译器在划分内存区域的时候经常将管理的区域划分为数据段和代码段,数据段包括堆.栈以及静态数据区.那么在Java语言当中,内 ...
- @Tomcat中的几种log
日志是程序员居家旅行必备,哦不对,是定位问题,修复bug,甚至是验证应用是否正常的必备利器.甚至很多时候,我们做一次部署仅仅是为了加一行log.虽然现在有各种各样的问题诊断工具,但是在定位线上问题时, ...
- SD内存卡禁止写入只读怎么办?另类SPI模式修复坏卡
这几天很郁闷,买的32G TF卡老出问题,三星的标,不知道是不是正品,标称C10,且不说是不是真的三星和真的C10,反正测试一下容量倒是真的,价格么也比较亲民,好像是69块? 哎,可惜呀,好景不长 ...
- C# MemCached分布式缓存
using System; using System.Collections.Generic; using System.Text; using Memcached.ClientLibrary; us ...
- 【R】自定义函数方法
- Concurrent HTTP connections in Node.js
原文: https://fullstack-developer.academy/concurrent-http-connections-in-node-js/ -------------------- ...
- apache 错误:The system cannot find the file specified.
在启动apache时出现了以下错误信息 Window日志里也记录了此错误信息 而出现此错误的原因是IIS占用了80端口 停止IIS再重新启动apache即可解决 参考: cannot find ...
- ASP入门(三)-VBScript变量、运算符
ASP内置了两种语法引擎,分别是VBScript和JScript. VBScript是VB的一个子集.JScript和JavaScript有些类似. 如果你熟悉VB,建议用VBScript,否则推荐使 ...