CentOS7 Docker 安装
CentOS7 已经内置了docker ,可以直接安装
安装Docker
命令: sudo yum install -y docker

启动docker
命令: service docker start
发现会出现异常
无法启动:
按照提示执行:
命令: systemctl status docker.service
这是由于overlay2不支持造成的,所以我们要关闭它
命令: vim /etc/sysconfig/docker
进入修改配置 selinux-enabled=false

再次执行 service docker start
执行命令: docker -v
启动成功。
修改Docker镜像加速器
国外的docker镜像访问速度太慢 所以我们可以修改成阿里的docker镜像。这样速度会快很多。
1.打开阿里云docker仓库地址https://dev.aliyun.com/search.html
2.淘宝账号即可登录,登录后点击自己的管理中心。
3.点击管理中心左侧菜单栏的“镜像加速器”,右边面板会有你的加速地址,面板下面有详细设置步骤。如下图:

root@localhost ~]# vi /etc/docker/daemon.json
将下面整行字符拷贝进去,保存并退出
"registry-mirrors": ["https://xrij41fy.mirror.aliyuncs.com"]
:wq!
刷新daemon
[root@localhost ~]# systemctl daemon-reload
重启docker
[root@localhost ~]# systemctl restart docker
拉取镜像
以hello-world为例

[root@localhost tmp]# docker pull hello-world
Using default tag: latest
Trying to pull repository docker.io/library/hello-world ...
latest: Pulling from docker.io/library/hello-world
9bb5a5d4561a: Pull complete
Digest: sha256:f5233545e43561214ca4891fd1157e1c3c563316ed8e237750d59bde73361e77
Status: Downloaded newer image for docker.io/hello-world:latest

表示成功拉取
运行镜像

[root@localhost tmp]# docker run hello-world
CentOS7 Docker 安装的更多相关文章
- centos7 docker 安装配置
docker快速入门测试 ########################################## #docker安装配置 #环境centos7 #配置docker阿里源 echo '#D ...
- centos7 docker 安装 mysql5.7.24 导入12G的sql
先在CentOS7里面安装docker Docker 要求 CentOS 系统的内核版本高于 3.10 ,查看本页面的前提条件来验证你的CentOS 版本是否支持 Docker .通过 uname - ...
- centos7+docker 安装和部署crawlab分布式爬虫平台,并使用docker-compose管理docker
1.先决条件centos7+docker最新版本 sudo yum updat 2.配置一下镜像源,创建/etc/docker/daemon.conf文件,在其中输入如下内容 { "regi ...
- centos7 docker安装
Docker分为社区版CE和企业版EE. 社区版是免费提供给个人开发者和小型团体使用的,企业版会提供额外的收费服务,比如经过官方测试认证过的基础设施.容器.插件等 社区版按照stable和edge两种 ...
- Centos7 Docker 安装笔记
1. docker官方文档地址:https://docs.docker.com/ 2. centos版本号查看命令:uname -a centos7.3版本 3. 直接yum -install ...
- centos7 docker安装和使用_入门教程
说明:本文也是参考互联网上的文章写的,感谢相关作者的贡献. 操作系统 64位CentOS Linux release 7.2.1511 (Core) 配置好IP:192.168.1.160 修改yum ...
- linux下(centos7)docker安装
参考链接https://docs.docker.com/install/linux/docker-ce/centos/ 第一步,确定是centos7及以上版本 cat /etc/redhat-rele ...
- centos7 docker安装详解
查看内核和操作系统版本[root@prod3 ~]# uname -r3.10.0-327.el7.x86_64[root@prod3 ~]# cat /etc/redhat-release Cent ...
- centos7 docker 安装 zookeeper 3.4.13 集群
假设三台主机的ip分别为: 主机一:192.168.0.168 主机二:192.168.0.169 主机三:192.168.0.170 三台主机的安装步骤相似,以主机一为例: 1. 查找zookeep ...
随机推荐
- nat 类型及打洞原理
nat 类型分4种 1.全锥形 full cone A 与 主机B交互,nat转换 A的内部地址及端口为 ip1 port1,ip1和port1为对外地址,任何机器能访问. 2.ip 受限制(对B而 ...
- codeblocks 更换颜色主题
关闭codeblocks,下载主题文件(colour_themes.conf).在关闭codeblocks的情况下,linux下的~/.config/codeblocks/下有个conf文件,将其备份 ...
- C++ auto
auto用来声明自动变量.它是存储类型标识符,表明变量(自动)具有本地范围.块范围的变量声明(如for循环体内的变量声明)默认为auto存储类型. 好处:auto变量在离开作用域是会变程序自动释放,不 ...
- 使用VisualSVN Server搭建SVN服务器[xyytit]
使用 VisualSVN Server来实现主要的 SVN功能则要比使用原始的 SVN和 Apache相配合来实现源代码的 SVN管理简单的多,上手也没有那么复杂. 下面就看看详细的说明 Visual ...
- 关于mybatis缓存配置详解
一级缓存: 一级缓存是默认的. 测试:在WEB页面同一个查询执行两次从日志里面看同样的sql查询执行两次. 2次sql查询,看似我们使用了同一个sqlSession,但是实际上因为我们的dao继承了S ...
- Castle ActiveRecord学习(一)简介
简介 来源:http://www.cnblogs.com/zxj159/p/4082987.html 一.Active Record(活动记录)模式 Active Record是业务逻辑层中(< ...
- DB2频繁出现死锁,常用解决问题的命令
--DB2频繁出现死锁,常用解决问题的命令db2 get snapshot for locks on sampledb2 get db cfg for sampledb2 update db cfg ...
- laravel的foreach
1.控制器 2.模板
- 配置 Mysql 支持远程访问 并取消域名解析以提高链接速度
1 配置远程访问 1.1 修改 my.cnf [mysqld] 段 bind-address = 0.0.0.0 //支持所有 ipv4 1.2 建立远程访问用户 mysql> grant al ...
- socketpair初识
#include <stdio.h> #include <string.h> #include <unistd.h> #include <sys/typ ...