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 ...
随机推荐
- [转]在ubuntu linux下以编译方式安装LAMP(apache mysql php)环境
FROM : http://www.cnblogs.com/eleganthqy/archive/2010/02/28/1675217.html 最近转向到了使用ubuntu做桌面,安装好系统以来一直 ...
- go语言之进阶篇方法的重写
1.方法的重写 示例: //Person类型,实现了一个方法 func (tmp *Person) PrintInfo() { fmt.Printf("name=%s, sex=%c, ag ...
- 细说Request与Request.Params
在ASP.NET编程中,有三个比较常见的来自于客户端的数据来源:QueryString, Form, Cookie .我们可以在HttpRequest中访问这三大对象,比如,可以从QueryStrin ...
- Letter Combinations of a Phone Number leetcode java
题目: Given a digit string, return all possible letter combinations that the number could represent. A ...
- ORM数据库框架 SQLite ORMLite MD
Markdown版本笔记 我的GitHub首页 我的博客 我的微信 我的邮箱 MyAndroidBlogs baiqiantao baiqiantao bqt20094 baiqiantao@sina ...
- [VS2010搭建汇编开发环境win32和x64]
场景: 1. 虽然使用MASM32也可以编译运行汇编程序,但是既然装了VS2010,它也能支持编译运行汇编吧.不然微软的开发人员难道还不用vs写汇编程序了? http://www.masm32.com ...
- VB.NET,C#.NET调用Web Service,利用visual studio 的实现方法
下面是一篇文章比较详细,其实具体操作很简单,把Web Service服务地址,利用工具(VS2010),通过添加引用的形式,添加到项目中来就可以应用了. 大家如果这个地方不会操场的话,可以问问我QQ: ...
- cmd怎么删除Oracle数据库中的用户实例
Oracle数据库使用过程中,针对系统都会建立独立的数据库用户,但有些时候处于测试或别的原因需要删除,原来的DB用户,这时我们可以使用下面的办法. 下属操作的前提是——确保数据库服务及监听均处于启动状 ...
- 十个 Laravel 5 程序优化技巧
性能一直是 Laravel 框架为人诟病的一个点,所以调优 Laravel 程序算是一个必学的技能. 接下来分享一些开发的最佳实践,还有调优技巧,大家有别的建议也欢迎留言讨论. 这里是简单的列表: 配 ...
- R读 txt 文件
house<-read.table("house_data.txt", header = TRUE, sep='|',fileEncoding ='UTF-8') id|ho ...