在centos7上安装Docker CE
Docker CE的基本安装
https://docs.docker.com/engine/installation/linux/docker-ce/centos/
一、系统要求
1、安装Docker CE,需要一个维护版本的Centos7
2、centos-extras库必须启用,这个存储库默认启用,但是如果您禁用了它,您需要重新启用它(https://wiki.centos.org/AdditionalResources/Repositories)
二、卸载旧版本
yum remove docker docker-common docker-selinux
三、安装Docker CE
1、使用仓库安装
1)安装需要的依赖包
yum install -y yum-utils device-mapper-persistent-data
2)配置稳定仓库
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
3)安装
yum install docker-ce
4)安装指定版本的Docker
[root@docker ~]# yum list docker-ce --showduplicates | sort -r
* updates: mirrors.aliyun.com
Loading mirror speeds from cached hostfile
Loaded plugins: fastestmirror
Installed Packages
* extras: mirrors.aliyun.com
docker-ce.x86_64 17.09.0.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.09.0.ce-1.el7.centos @docker-ce-stable
docker-ce.x86_64 17.06.2.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.06.1.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.06.0.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.03.2.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.03.1.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.03.0.ce-1.el7.centos docker-ce-stable
* base: mirrors.aliyun.com
Available Packages [root@docker ~]# yum install docker-ce-17.06.0.ce-1.el7.centos.x86_64
5)启动docker
systemctl start docker
5)验证docker是否安装正确
docker run hello-world
2、使用rpm包安装docker
1)稳定版下载地址:
https://download.docker.com/linux/centos/7/x86_64/stable/Packages/
2)安装
yum install -y /path/to/package.rpm
3)启动
systemctl start docker
4)版本升级
yum -y upgrade /path/to/package.rpm
3、使用已有脚本安装
curl -fsSL get.docker.com -o get-docker.sh
sh get-docker.sh
4、配置Docker开机自启动
systemctl enable docker
四、卸载Docker CE
卸载docker-ce
yum remove docker-ce
在您的主机上的镜像、容器、卷或自定义配置文件不会自动删除,要删除所有图像、容器和卷:
rm -rf /var/lib/docker
Linux安装后的步骤
https://docs.docker.com/engine/installation/linux/linux-postinstall/
一、使用非root用户管理Docker
1、创建docker群组
groupadd docker
2、添加需要管理docker的非root用户到docker群组
usermod -aG docker $USER
故障排除
https://docs.docker.com/engine/installation/linux/linux-postinstall/#troubleshooting
1、内核兼容性
如果您的内核版本3.10小,或者缺少一些模块,Docker将无法正常运行。为了检查内核兼容性,您可以下载并运行check-compatibility.sh脚本
curl https://raw.githubusercontent.com/docker/docker/master/contrib/check-config.sh > check-config.sh bash ./check-config.sh
2、无法连接到docker deamon
要查看您的docker客户端主机配置的是连接哪个主机,请检查您环境中DOCKER_HOST变量的值。
env | grep DOCKER_HOST
如果这个命令返回一个值,那么Docker客户端主机被设置为连接到运行在那台主机上的Docker守护进程。如果未设置,则Docker客户端被连接到运行在本地主机上的Docker守护进程。如果设置错误,请使用以下命令取消设置:
unset DOCKER_HOST
在centos7上安装Docker CE的更多相关文章
- Centos7上安装docker (转)
Centos7上安装docker Docker从1.13版本之后采用时间线的方式作为版本号,分为社区版CE和企业版EE. 社区版是免费提供给个人开发者和小型团体使用的,企业版会提供额外的收费服务,比如 ...
- centos7上安装docker社区版
container(容器) docker(集装箱) 容器的优点 1. 启动速度快 2. 节省资源 3. 兼容性高 保证机器正常上网 #ping www.baidu.com CPU需要支持虚拟化 # g ...
- debian上安装docker ce
在Debian9上安装Docker CE 使用从包中安装的方式 Docker是一个开源的容器引擎,它有助于更快地交付产品.Docker可将应用程序和基础设施层隔离,并且将基础设施当作程序一样进行管理. ...
- Ubuntu18.04上安装Docker CE
建立 REPOSITORY 1.更新索引包 更新 /etc/apt/sources.list 和 /etc/apt/sources.list.d 中列出的源的地址,这样才能获取到最新的软件包 sudo ...
- centos7 下安装Docker CE
前提条件 操作系统要求 要保证centos-extrasrepository开启(enabled).默认处于开启状态. 推荐使用overlay2存储驱动 卸载老版本 $ sudo yum remove ...
- Centos7上安装docker (新手版本)
1首先要有一个安装好的Centos7 2打开终端,输入一下命令(自动安装最新版本) curl -fsSL https://get.docker.com | bash -s docker --mirro ...
- Centos7上安装docker
Docker从1.13版本之后采用时间线的方式作为版本号,分为社区版CE和企业版EE. 社区版是免费提供给个人开发者和小型团体使用的,企业版会提供额外的收费服务,比如经过官方测试认证过的基础设施.容器 ...
- 在CentOS7上安装Docker
具体过程如下 到网站下载centos7: http://isoredirect.centos.org/ http://isoredirect.centos.org/centos/7/isos/x86_ ...
- Docker:测试环境的准备-centos7上安装docker
Dockers官方部署文档:https://docs.docker.com/install/linux/docker-ce/centos/ 1.建议先关闭 selinux (selinux是 linu ...
随机推荐
- hudson搭建经验总结(三)
作者:朱金灿 来源:http://blog.csdn.net/clever101 在创建hudson账户和分配权限时出错,当单击save按钮时出现 HTTP Status 500 - type Exc ...
- Android开发 ----------怎样真机调试?
一般来说 真机调试 是最快的, 所以建议 大家 直接用真机调试.
- 常用user agent
测试user agnet的网站: http://whatsmyuseragent.com/ Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) ...
- thinkphp3.2定义多模块并设置默认模块
前台入口文件index.php <?php // +---------------------------------------------------------------------- ...
- StackLayout
堆栈式地放置内容可以在xaml中完成视图,也可以在cs代码中完成视图 Xamarin的所有视图和布局都是可以 1.在xaml中完成 2.在cs代码中完成视图 (类比WPF) 示例 在cs代码中完成视图 ...
- QRCode二维码生成方案及其在带LOGO型二维码中的应用(2)
原文:QRCode二维码生成方案及其在带LOGO型二维码中的应用(2) 续前:QRCode二维码生成方案及其在带LOGO型二维码中的应用(1) http://blog.csdn.net/johnsu ...
- 基于Go语言快速构建RESTful API服务
In this post, we will not only cover how to use Go to create a RESTful JSON API, but we will also ta ...
- 发布ActiveX控件
最近我们正在研究ActiveX技术.我们使用Delphi 5创建了一个具有ActiveForm的ActiveX控件应用程序.这个控件产生一个.OCX文件.现在,我们需要把这个控件部署在服务器端,在用户 ...
- storm(二)消息的可靠处理
storm 通过 trident保证了对消息提供不同的级别.beast effort,at least once, exactly once. 一个tuple 从spout流出,可能会导致大量的tup ...
- .net的数据类型说明
C#提供称为简单类型的预定义结构类型集,简单类型通过保留字标识, 而这些保留字只是System命名空间中预定义结构类型的别名. 保留字与预定义结构类型的对应如下: 保留字 预定义结构类型 sbyte ...