一. 安装docker

1.升级rpm包

yum -y update  

2. 通过命令设置Docker CE 资源库:

 yum install -y yum-utils
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

3.生成缓存

sudo yum makecache fast 

4.查看可下载版本

yum list docker-ce --showduplicates | sort -r

4.安装并启动docker

yum -y install docker-ce  

二.设置镜像下载地址

在/etc/docker/daemon.json 内添加

 {
"registry-mirrors": ["https://docker.mirrors.ustc.edu.cn"]
}

三、开放管理端口映射

1.编辑  /lib/systemd/system/docker.service

ExecStart=/usr/bin/dockerd

替换为 下面

 ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock 

2.将管理地址变量写进profile

echo 'export DOCKER_HOST=tcp://0.0.0.0:2375' >> /etc/profile

四.重启服务

systemctl daemon-reload && systemctl  restart docker

五、测试docker

docker run hello-world 

若成功:

Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
Digest: sha256:f5233545e43561214ca4891fd1157e1c3c563316ed8e237750d59bde73361e77
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:
. The Docker client contacted the Docker daemon.
. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
. 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 ID:
https://hub.docker.com/ For more examples and ideas, visit:
https://docs.docker.com/engine/userguide/

Centos7 安装docker ce的更多相关文章

  1. Centos7安装Docker CE

      每次安装Docker都要去找文档,或者每次安装的都不一样,还是要好好管理自己的这些东西,下次用的时候可以省很多的时间   Docker的早期版本称为docker或docker-engine:现在的 ...

  2. CentOS7 安装 Docker CE步骤

    准备工作 系统要求 Docker CE 支持 64 位版本 CentOS 7,并且要求内核版本不低于 3.10. CentOS 7 满足最低内核的要求,但由于内核版本比较低,部分功能(如 overla ...

  3. 在centos7上安装Docker CE

    Docker CE的基本安装 https://docs.docker.com/engine/installation/linux/docker-ce/centos/ 一.系统要求 1.安装Docker ...

  4. centos7 下安装Docker CE

    前提条件 操作系统要求 要保证centos-extrasrepository开启(enabled).默认处于开启状态. 推荐使用overlay2存储驱动 卸载老版本 $ sudo yum remove ...

  5. CentOS7 下 yum 安装 Docker CE

    前言 Docker 使用越来越多,安装也很简单,本次记录一下基本的步骤. Docker 目前支持 CentOS 7 及以后的版本,内核要求至少为 3.10. Docker 官网有安装步骤,本文只是记录 ...

  6. Docker进阶之四:centos7安装docker

    centos7.6 安装docker 参考:https://docs.docker.com/install/linux/docker-ce/centos/ 一.存在老版本先删除 yum remove ...

  7. centos7 部署 docker ce

    =============================================== 2019/4/9_第1次修改                       ccb_warlock === ...

  8. 【运维技术】VM虚拟机上使用centos7安装docker启动gogs服务教程【含B站视频教程】

    VM虚拟机上使用centos7安装docker启动gogs服务视频教程 BiliBili视频教程链接飞机票,点我 使用VMware Workstation安装Centos7 MinMal系统 第一步: ...

  9. ubuntu16.04安装docker CE

    如需开始在 Ubuntu 上使用 Docker CE,请确保您满足先决条件,然后再安装 Docker. 如需安装 Docker 企业版 (Docker EE),请转至获取适用于 Ubuntu 的 Do ...

随机推荐

  1. Face The Right Way POJ - 3276 (开关问题)

    Face The Right Way Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 6707   Accepted: 312 ...

  2. 记忆化搜索:POJ1579-Function Run Fun(最基础的记忆化搜索)

    Function Run Fun Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 14815 Accepted: 7659 Des ...

  3. [Poj3281]Dining(最大流)

    Description 有n头牛,f种食物,d种饮料,每头牛有nf种喜欢的食物,nd种喜欢的饮料,每种食物如果给一头牛吃了,那么另一个牛就不能吃这种食物了,饮料也同理,问最多有多少头牛可以吃到它喜欢的 ...

  4. 朴素贝叶斯python小样本实例

    朴素贝叶斯优点:在数据较少的情况下仍然有效,可以处理多类别问题缺点:对于输入数据的准备方式较为敏感适用数据类型:标称型数据朴素贝叶斯决策理论的核心思想:选择具有最高概率的决策朴素贝叶斯的一般过程(1) ...

  5. 快速获取Android应用包名和Activity名

    一.获取包名 方法1: 先说明一下这里讲的方法是通用的,而网上其他方法获取PackageName不通用(因为他是建立在root的基础上的,我不敢保证你的设备已经root). ①在android设备上点 ...

  6. 【Python】locust框架接口性能测试(一)

    本人工作中主要对接口与web进行性能测试,而接口测试主要为http协议接口和webservice接口,本文主要对locust框架http接口测试先进行简单介绍. 1.测试需求 对某系统登录接口进行测试 ...

  7. mojoportal在IE10中点击ImageButton出错的处理方法

    在ie10中,如果点击了mojoportal中的imagebutton,会出现错误,在ie10之前的浏览器,及ie10的兼容模式中及谷歌浏览器中都不会出现. 日志中 错误信息如下: 2013-09-2 ...

  8. 导入50G文件到mysql,然后再倒入sqlserver

    --导入大文件50G文件到mysql1.修改配置innodb_flush_log_at_trx_commit=0 2.导入时的注意事项set autocommit=1;show variables l ...

  9. [oldboy-django][5python基础][高级特性]Iterator迭代器

    # 区分可迭代对象iterable, 迭代器iterator, 生成器generator a. iterable 可直接用for循环的对象,都称为可迭代对象, from collections imp ...

  10. RNQOJ 开心的金明

    题目描述 金明今天很开心,家里购置的新房就要领钥匙了,新房里有一间他自己专用的很宽敞的房间.更让他高兴的是,妈妈昨天对他说:“你的房间需要购买哪些物品,怎么布置,你说了算,只要不超过N 元钱就行”.今 ...