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 安装的更多相关文章

  1. centos7 docker 安装配置

    docker快速入门测试 ########################################## #docker安装配置 #环境centos7 #配置docker阿里源 echo '#D ...

  2. centos7 docker 安装 mysql5.7.24 导入12G的sql

    先在CentOS7里面安装docker Docker 要求 CentOS 系统的内核版本高于 3.10 ,查看本页面的前提条件来验证你的CentOS 版本是否支持 Docker .通过 uname - ...

  3. centos7+docker 安装和部署crawlab分布式爬虫平台,并使用docker-compose管理docker

    1.先决条件centos7+docker最新版本 sudo yum updat 2.配置一下镜像源,创建/etc/docker/daemon.conf文件,在其中输入如下内容 { "regi ...

  4. centos7 docker安装

    Docker分为社区版CE和企业版EE. 社区版是免费提供给个人开发者和小型团体使用的,企业版会提供额外的收费服务,比如经过官方测试认证过的基础设施.容器.插件等 社区版按照stable和edge两种 ...

  5. Centos7 Docker 安装笔记

    1. docker官方文档地址:https://docs.docker.com/ 2. centos版本号查看命令:uname -a    centos7.3版本 3. 直接yum -install ...

  6. centos7 docker安装和使用_入门教程

    说明:本文也是参考互联网上的文章写的,感谢相关作者的贡献. 操作系统 64位CentOS Linux release 7.2.1511 (Core) 配置好IP:192.168.1.160 修改yum ...

  7. linux下(centos7)docker安装

    参考链接https://docs.docker.com/install/linux/docker-ce/centos/ 第一步,确定是centos7及以上版本 cat /etc/redhat-rele ...

  8. centos7 docker安装详解

    查看内核和操作系统版本[root@prod3 ~]# uname -r3.10.0-327.el7.x86_64[root@prod3 ~]# cat /etc/redhat-release Cent ...

  9. centos7 docker 安装 zookeeper 3.4.13 集群

    假设三台主机的ip分别为: 主机一:192.168.0.168 主机二:192.168.0.169 主机三:192.168.0.170 三台主机的安装步骤相似,以主机一为例: 1. 查找zookeep ...

随机推荐

  1. docker 入門

    http://dockone.io/article/277 我的碎碎念:Docker入门指南 [编者的话]之前曾经翻译过很多Docker入门介绍的文章,之所以再翻译这篇,是因为Anders的角度很独特 ...

  2. 大型运输行业实战_day07_2_数据字典实现

    1.数据字典表 CREATE TABLE `dic` ( `id` ) NOT NULL AUTO_INCREMENT, `table_name` ) DEFAULT NULL, `field_nam ...

  3. java线程状态及转换

    java线程有6种状态: 新建线程new,启动线程runnable,阻塞block,限时等待timed_waiting,等待线程waiting,终止线程terminated 1.限时等待timed w ...

  4. [leetcode]299. Bulls and Cows公牛和母牛

    You are playing the following Bulls and Cows game with your friend: You write down a number and ask ...

  5. Eclipse Gradle配置

    一.Gradle简介 Gradle 是以 Groovy 语言为基础,面向Java应用为主.基于DSL(领域特定语言)语法的自动化构建工具. 二.配置步骤如下: 1.资源下载: Grandle官网下载G ...

  6. 779A Pupils Redistribution

    /* A. Pupils Redistribution time limit per test 1 second memory limit per test 256 megabytes input s ...

  7. livecd-creator: UnicodeEncodeError: 'ascii' codec can't encode characters in position 1282-1

    通过livecd-creator进行构建ISO过程中出现题目中错误, livecd-creator命令属于包livecd-tools 问题原因: 编码错误,初步判断应该与编码相关的环境变量设置有关 解 ...

  8. code1213 解的个数 扩展欧几里得

    很不错的题,加深了我对exgcd的理解 (以前我认为做题就是搜索.dp...原来数学也很重要) 理解了几个小时,终于明白了.但我什么都不打算写. 看代码吧: #include<iostream& ...

  9. JMeter Ant Task 生成的*.jtl打开之后request和response data是空的,怎样让其不是空的呢?

    JMeter Ant Task 生成的*.jtl打开之后request和response data是空的,怎样让其不是空的呢?修改JMeter.properties,将jmeter.save.save ...

  10. Netty 零拷贝(一)NIO 对零拷贝的支持

    Netty 零拷贝(二)NIO 对零拷贝的支持 Netty 系列目录 (https://www.cnblogs.com/binarylei/p/10117436.html) 非直接缓冲区(HeapBy ...