1. 环境

$ lsb_release -a  # 需要安装 redhat-lsb-core 包
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.5. (Core)
Release: 7.5.
Codename: Core

2. 安装docker-ce

. 移除旧版本:
yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-selinux \
docker-engine-selinux \
docker-engine . 安装系统工具
yum install -y yum-utils device-mapper-persistent-data lvm2 . 添加软件源
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo . 更新 yum 缓存
yum makecache fast . 安装docker-ce
yum -y install docker-ce . 启动服务
systemctl enable docker.service
systemctl start docker.service
systemctl status docker.service

● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: active (running) since Tue 2019-02-19 14:32:54 CST; 15min ago
Docs: https://docs.docker.com
Main PID: 30656 (dockerd)
Tasks: 20
Memory: 58.1M
CGroup: /system.slice/docker.service
├─30656 /usr/bin/dockerd -H fd://
└─30660 containerd --config /var/run/docker/containerd/containerd.toml --log-level info

Feb 19 14:32:54 VM_0_7_centos dockerd[30656]: time="2019-02-19T14:32:54.562741035+08:00" level=info msg="Docker daemon" commit=62...18.09.2
Feb 19 14:32:54 VM_0_7_centos dockerd[30656]: time="2019-02-19T14:32:54.562856673+08:00" level=info msg="Daemon has completed ini...zation"
Feb 19 14:32:54 VM_0_7_centos dockerd[30656]: time="2019-02-19T14:32:54.600567389+08:00" level=info msg="API listen on /var/run/d...r.sock"
Feb 19 14:32:54 VM_0_7_centos systemd[1]: Started Docker Application Container Engine.
Feb 19 14:33:19 VM_0_7_centos dockerd[30656]: time="2019-02-19T14:33:19.281603981+08:00" level=info msg="shim containerd-shim sta...d=30841
Feb 19 14:33:19 VM_0_7_centos dockerd[30656]: time="2019-02-19T14:33:19.638873050+08:00" level=info msg="shim reaped" id=ebf4c60d...3e8f83a
Feb 19 14:33:19 VM_0_7_centos dockerd[30656]: time="2019-02-19T14:33:19.648960086+08:00" level=info msg="ignoring event" module=l...Delete"
Feb 19 14:43:24 VM_0_7_centos dockerd[30656]: time="2019-02-19T14:43:24.662160874+08:00" level=info msg="shim containerd-shim sta...d=31842
Feb 19 14:43:25 VM_0_7_centos dockerd[30656]: time="2019-02-19T14:43:25.061068379+08:00" level=info msg="shim reaped" id=f70bd83d...edcba6a
Feb 19 14:43:25 VM_0_7_centos dockerd[30656]: time="2019-02-19T14:43:25.071236528+08:00" level=info msg="ignoring event" module=l...Delete"
Hint: Some lines were ellipsized, use -l to show in full.

. 验证
docker run hello-world 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/get-started/

3. 卸载 docker-ce

yum remove docker-ce
rm -rf /var/lib/docker

4. 推荐

在安装过程中,因为要联网,我的作法是申请了一台免费的腾讯云机器,第一次注册的新用户有15天的免费试用权,希望能够完成多数docker相关任务的研究工作。更多内容请参考:中文文档:https://docs.docker-cn.com/get-started,英文文档:https://docs.docker.com/get-started

[TimLinux] docker CentOS7安装docker-ce最新版的更多相关文章

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

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

  2. 获取Centos7安装Docker各种姿势(指定版本)(转载)

    Centos7安装docker社区(CE)版 官网指导:https://docs.docker.com/engine/installation/linux/docker-ce/centos/#inst ...

  3. CentOS7安装docker 18.06

    原文:CentOS7安装docker 18.06 一.CentOS Docker 安装 参考docker 官方网站:https://docs.docker.com/install/linux/dock ...

  4. Centos7安装Docker 基于Dockerfile 搭建httpd运行环境

    Centos7安装Docker 基于Dockerfile 搭建httpd运行环境 docker docker搭建 docker build 本文档完成目标内容如下 使用Docker搭建http服务器一 ...

  5. centos7安装docker并安装jdk和tomcat(常用命令)

    阿里专属的镜像加速 在宿主机器编辑文件:vi /etc/docker/daemon.json 阿里专属的镜像加速地址,类似于"https://91cntlkt.mirror.aliyuncs ...

  6. centos7安装 docker

    centos7安装 docker 切换到 root用户,执行: [root@localhost frinder]# yum install docker已加载插件:fastestmirror, lan ...

  7. centos install docker setup centos7 安装docker

    centos7 安装docker 1: 安装必要的一些系统工具sudo yum install -y yum-utils device-mapper-persistent-data lvm2 2: 添 ...

  8. centos7 安装docker(手动和脚本安装)换源 卸载

    centos7 安装docker(手动和脚本安装)换源 卸载 Docker 要求 CentOS 系统的内核版本高于 3.10 ,查看本页面的前提条件来验证你的CentOS 版本是否支持 Docker ...

  9. Linux CentOS7 安装docker

    Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的Linux机器上,也可以实现虚拟化,容器是完全使用沙箱机制,相互之间不会有任何接口 ...

  10. Docker学习笔记(1):CentOS7安装Docker

    Docker是一个基于Go语言实现的开源应用容器引擎,通过对应用组件的封装.分发.部署.运行等生命周期的管理,使程序及其运行环境能够做到"一次封装,到处运行". Docker架构 ...

随机推荐

  1. Flink入门(一)——Apache Flink介绍

    Apache Flink是什么? ​ 在当代数据量激增的时代,各种业务场景都有大量的业务数据产生,对于这些不断产生的数据应该如何进行有效的处理,成为当下大多数公司所面临的问题.随着雅虎对hadoop的 ...

  2. nyoj 100-1的个数 (因为只统计1的个数,连栈都不需要了)

    100-1的个数 内存限制:64MB 时间限制:3000ms 特判: No 通过数:33 提交数:42 难度:1 题目描述: 小南刚学了二进制,他想知道一个数的二进制表示中有多少个1,你能帮他写一个程 ...

  3. (二十九)golang--map

    map:是key-value数据结构,又称为字段或者关联数组,类似其它编程语言的集合: 基本语法:var 名称 map[键类型]值类型 key的类型可以是:bool.数字.string.指针.管道,还 ...

  4. NPM 源的管理器nrm

    作为一个 NPM 源管理器,nrm允许快速地在如下 NPM 源间切换: 列表项目 npm cnpm strongloop enropean australia nodejitsu taobao Ins ...

  5. PostGIS 存储过程调试

    说明: 在使用Postgis做路径分析时需要用到数据库的存储过程,但是存储过程逻辑很复杂,很想看一下每步的执行结果. 百度了一下,发现postgresql有插件可以支持调试存储过程. 解决方案: 1. ...

  6. day02_Requests模块

    1.anaconda的安装 1.1 .安装可执行程序 1.2 .配置环境变量 ​ 根据环境变量的先后顺序去查找可执行程序文件,如果查找到就执行,如果查找不到就报错. ​ anaconda主要配置: ​ ...

  7. 移动端App uni-app + mui 开发记录

    前言 uni-app uni-app是DCloud推出的终极跨平台解决方案,是一个使用Vue.js开发所有前端应用的框架,官网:https://uniapp.dcloud.io/ mui 号称最接近原 ...

  8. ibatis入门实例(完整)

    一:首先展示一下我的web文件结构,首先导入Ibatis所需jar和数据库驱动,从第二步开始跟着笔者一步步来 二:数据库建测试表 CREATE TABLE STUDENT ( ID NUMBER(5) ...

  9. 两个对象值相同(x.equals(y)==true),但却可有不同的hashcode这句话对吗?

    1.这句话当然不对啦,请参看官方文档给出的解释! hashCode public int hashCode()返回该对象的哈希码值.支持此方法是为了提高哈希表(例如 java.util.Hashtab ...

  10. 跨平台c开发库tbox:内存库使用详解

    TBOX是一个用c语言实现的跨平台开发库. 针对各个平台,封装了统一的接口,简化了各类开发过程中常用操作,使你在开发过程中,更加关注实际应用的开发,而不是把时间浪费在琐碎的接口兼容性上面,并且充分利用 ...