docker安装 2016-11-06 19:14 299人阅读 评论(31) 收藏
Docker支持运行在以下CentOS版本: 
CentOS 7.X
安装在二进制兼容的EL7版本如 Scientific Linux也是可能成功的,但是Docker 
没有测试过并且不官方支持。
此文带你通过使用Docker管理的发行包和安装机制来安装。使用这些报能确保你使用最新的Docker版本。 
如果你希望使用CentOS管理的包,请阅读你的CentOS文档。 
要求
不过你的系统版本是多少,Docker都要求64位。并且当CentOS7时你的内核必须不小于3.10。
检查当前内核版本:
uname -r
3.10.0-229.el7.x86_64
建议将系统升级到最新。 
安装
有两种方式可安装Docker Engine。脚本安装和yum安装。 
脚本安装
1.使用root权限登陆系统。 
2.更新系统包到最新。 
    # yum -y update
3.执行Docker安装脚本 
    # curl -sSL https://get.docker.com/ | sh 
    # yum install -y docker-selinux
这个脚本会添加docker.repo 配置并安装Docker。 
4.启动Docker 
    # systemctl start docker.service
5.验证docker已经正常安装 
    # docker run hello-world
yum安装
1.使用root权限登陆系统。 
2.更新系统包到最新。 
    # yum -y update
3.添加yum仓库 
    # cat >/etc/yum.repos.d/docker.repo <<-EOF 
    [dockerrepo] 
    name=Docker Repository 
    baseurl=https://yum.dockerproject.org/repo/main/centos/7 
    enabled=1 
    gpgcheck=1 
    gpgkey=https://yum.dockerproject.org/gpg 
    EOF
4.安装Docker包 
    # yum install -y docker-engine 
    yum install -y docker-selinux
yum list installed | grep docker
docker-engine.x86_64             1.8.1-1.el7.centos                    @dockerrepo
docker-selinux.x86_64            1.7.1-108.el7.centos                  @extras
这里有个非常坑的情况,官方文档没有提到docker-selinux的安装,笔者在使用VirtualBox,配置一个桥接,一个Host-Only的网卡时,只安装docker-engine启动会报错,需要在安装docker-selinux方可。 
可以看github上的两个issues,1.8.0: Systemd can’t start docker on Centos 7.1 #15498,Docker start times out if firewalld is started #13019。 
5.启动Docker 
    # systemctl start docker.service
6.验证docker已经正常安装 
    # docker run hello-world 
    Unable to find image ‘hello-world:latest’ locally 
    latest: Pulling from library/hello-world 
    535020c3e8ad: Pull complete 
    af340544ed62: Already exists 
    library/hello-world:latest: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security. 
    Digest: sha256:d5fbd996e6562438f7ea5389d7da867fe58e04d581810e230df4cc073271ea52 
    Status: Downloaded newer image for hello-world:latest
Hello from Docker.
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker Hub account:
https://hub.docker.com
For more examples and ideas, visit:
https://docs.docker.com/userguide/
docker安装 2016-11-06 19:14 299人阅读 评论(31) 收藏的更多相关文章
- winform datetimepacker 开始日期 结束日期                                                    分类:            WinForm             2014-07-15 19:14    124人阅读    评论(0)    收藏
		
dtpStart;//开始日期 dtpEnd;//结束日期 1:开始日期小于结束日期 加载dtpEnd的ValueChanged事件即可. //开始日期小于结束日期 private v ...
 - iOS纯代码手动适配                                                    分类:            ios技术             2015-05-04 17:14    239人阅读    评论(0)    收藏
		
首先说下让自己的程序支持iPhone6和6+,第一种使用官方提供的launch screen.xib,这个直接看官方文档即可,这里不再多述:第二种方法是和之前iPhone5的类似,比较简单,为iPho ...
 - ArcGIS for Server的安装及站点中的集群配置                                                       分类:            ArcGIS for server             2015-07-18 14:14    16人阅读    评论(0)    收藏
		
坚信并为之坚持是一切希望的原因. (不足之处,欢迎批评指正!) --------------------环境:Windows server2008R2虚拟机两台----------------- ...
 - ubuntu中安装samba                                                    分类:            linux             学习笔记             ubuntu             2015-07-07 16:14    46人阅读    评论(0)    收藏
		
为了方便的和Windows之间进行交互,samba必不可少. 当然,他的安装使用也很简单: 安装: sudo apt-get install samba sudo apt-get install sm ...
 - Raspberry Pi + 3个USB摄像头 + Motion(简易监控设备配置记录1——介绍以及安装)                                                    分类:            Raspberry Pi             服务器搭建             2015-04-12 19:21    226人阅读    评论(0)    收藏
		
参考: Debian官网链接 Motion官网链接 首先,参见Debian官网链接对Motion的介绍,网页中包含了所有相关依赖包,请首先确保这些依赖包的安装. Motion介绍 摘出对Motion的 ...
 - Oracle垃圾数据清理相关问题                                                       分类:            Oracle             2015-08-06 11:14    12人阅读    评论(0)    收藏
		
垃圾数据清理,简单的说,就是删除不需要的那些数据,释放存储空间 最常用的就是delete命令.truncate命令,甚至是删除表空间重建,具体操作都很简单,不是本文的重点 下面,总结几个垃圾数据清理常 ...
 - Curling 2.0                                                       分类:            搜索             2015-08-09 11:14    3人阅读    评论(0)    收藏
		
Curling 2.0 Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 14289 Accepted: 5962 Descript ...
 - Hdu4632 Palindrome subsequence                                                                                            2017-01-16 11:14             51人阅读              评论(0)              收藏
		
Palindrome subsequence Problem Description In mathematics, a subsequence is a sequence that can be d ...
 - 滑雪                                                       分类:            POJ             2015-07-23 19:48    9人阅读    评论(0)    收藏
		
滑雪 Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 83276 Accepted: 31159 Description Mich ...
 
随机推荐
- openCV图像合成
			
#include <iostream> #include <opencv2/opencv.hpp> #include <opencv2/highgui/highgui.h ...
 - 【html、CSS、javascript-5】css应用场景补充
			
一.CSS全局应用 父标签div下包含两个子标签div,当子标签dvi全部向左float,此时父标签设置的背景色是不显示的 <!DOCTYPE html> <html lang=&q ...
 - 【python之路28】模块python与excel
			
一.可使用的第三方库 python中处理excel表格,常用的库有xlrd(读excel)表.xlwt(写excel)表.openpyxl(可读写excel表)等.xlrd读数据较大的excel表时效 ...
 - bzoj 3743 [Coci2015]Kamp——树形dp+换根
			
题目:https://www.lydsy.com/JudgeOnline/problem.php?id=3743 树形dp+换根. “从根出发又回到根” 减去 “mx ” . 注意dfsx里真的要改那 ...
 - PHP与RBAC设计思路讲解与源码
			
在说权限管理前,应该先知道权限管理要有哪些功能: (1).用户只能访问,指定的控制器,指定的方法 (2).用户可以存在于多个用户组里 (3).用户组可以选择,指定的控制器,指定的方法 (4).可以添加 ...
 - 公共钥匙盒 ccf
			
试题编号: 201709-2 试题名称: 公共钥匙盒 时间限制: 1.0s 内存限制: 256.0MB 问题描述: 问题描述 有一个学校的老师共用N个教室,按照规定,所有的钥匙都必须放在公共钥匙盒里, ...
 - HTML 页面间传值(包含中文)
			
A页面——>B页面 A页面 $('.edit-bottom').click(function () { var word1=$('#word').val();//需要传到B页面的值 var ur ...
 - Robbin负载均衡
			
Robbin是在Spring Cloud中的一个组件,是由Netfix发布的负载均衡器,有助于控制HTTP和TCP客户端的行为.它给我们提供了默认的轮询.随机等负载均衡算法.同时也可以由我们定义自己的 ...
 - Lab1 ex1 物理页内存分配算法的实现
			
调用流程如下 kern_init --> pmm_init-->page_init-->init_memmap--> pmm_manager->init_memmap 从 ...
 - CentOS6.5在VMware中安装
			
链接:https://pan.baidu.com/s/1ggqmHxh 密码:v04l 1.启动VMware的画面 2.点击File--->New Virtual Machine 创建一台新虚拟 ...