先卸载旧的docker

sudo apt-get remove docker docker-engine docker.io docker-ce

通过HTTPS使用存储库(repository)

sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common

添加Docker官方的GPG密钥

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

设置stable存储库

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

更新一下apt包索引

sudo apt-get update

安装最新版本的Docker CE

sudo apt-get install -y docker-ce

或者列出版本,选择安装

apt-cache madison docker-ce
sudo apt-get install docker-ce=<VERSION>

例子:

sudo apt-get install docker-ce=17.12.1~ce-0~ubuntu

查看服务状态

jiqing@ThinkPad:~$ sudo /etc/init.d/docker start
start: Job is already running: docker
jiqing@ThinkPad:~$ sudo /etc/init.d/docker stop
docker stop/waiting
jiqing@ThinkPad:~$ sudo /etc/init.d/docker status
docker stop/waiting
jiqing@ThinkPad:~$ sudo /etc/init.d/docker restart
stop: Unknown instance:
docker start/running, process 31877

验证是否正常,sudo docker run hello-world

jiqing@ThinkPad:~$ sudo docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
9bb5a5d4561a: Pull complete
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:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. 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/

一切都是ok的。

ps:io,engine都是docker的早期版本。ce是社区版本,比较新。ee是企业版本。

ubuntu14安装docker-ce的更多相关文章

  1. 在Ubuntu14.04下安装Docker CE(1) - repository篇

    从2017年3月开始,Docker开始分为社区版本和企业版,也就是Docker CE和Docker EE, 原来Ubuntu14.04下,通过sudo apt-get install docker.i ...

  2. ubuntu16.04安装docker CE

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

  3. Ubuntu 安装 Docker CE(社区版)

    参考自 https://yeasy.gitbooks.io/docker_practice/install/ubuntu.html#ubuntu-1604- docker-io 是以前早期的版本,版本 ...

  4. 详细介绍Ubuntu 16.04系统环境安装Docker CE容器的过程

    由于项目的需要,我们在很多软件配置环境中需要用到Docker容器,这个时候我们可以用自己的VPS主机搭建.在这篇文章中,笔者将会利用Ubuntu 16.04系统环境安装Docker CE容器的过程.如 ...

  5. Centos7安装Docker CE

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

  6. ubuntu16.04 在线安装docker ce

    官方文档:https://docs.docker.com/install/linux/docker-ce/ubuntu/   ubuntu创建普通用户: adduser dk001 给该用户添加sud ...

  7. Ubuntu18.04上安装Docker CE

    建立 REPOSITORY 1.更新索引包 更新 /etc/apt/sources.list 和 /etc/apt/sources.list.d 中列出的源的地址,这样才能获取到最新的软件包 sudo ...

  8. Ubuntu 安装 Docker CE

    注:本文转载自<Docker入门> 警告:切勿在没有配置 Docker APT 源的情况下直接使用 apt 命令安装 Docker. 准备工作 系统要求 Docker CE 支持以下版本的 ...

  9. centos7 下安装Docker CE

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

  10. CentOS_mini下安装docker 之 安装docker CE

    警告:切勿在没有配置 Docker YUM 源的情况下直接使用 yum 命令安装 Docker. 原文地址:https://yeasy.gitbooks.io/docker_practice/inst ...

随机推荐

  1. 笔试算法题(17):奇偶数分置数组前后段 & 反序访问链表

    出题:输入一个数组,要求通过交换操作将奇数索引的元素调整到数组前半部分,偶数索引的元素调整到数组后半部分: 分析: 当然如果没有额外要求的话很容易实现,最好使用In-Place的实现策略:考虑插入排序 ...

  2. wampsever修改数据库密码

    ①进入localhost中的mysql数据库 ②再进入mysql数据库中的user表 ③将user表中的三个root账号的密码全部改为你想要的密码(不需要经过MD5加密) ④保存后重新启动服务 如果在 ...

  3. dbeaver能执行存储过程,db2命令编辑器里面不行

  4. Mysql:sql语句

    练习的表可以在博客的文件中下载 基础知识: 1.数据库的连接 mysql -u -p -h -u 用户名 -p 密码 -h host主机 2:库级知识 2.1 显示数据库: show database ...

  5. php - namespace篇

    之前没有系统学习过PHP语言,直接上手TP框架了,所以认为namespace和use是TP框架的一部分,最近学习语言模块的时候遇到了这个问题,所以汇总了一下. PHP中命名空间可以解决两类问题: 用户 ...

  6. Matlab学习笔记(三)

    二.MATLAB基础知识 (四)数组 MATLAB总是把数组看作存储和运算的基本单位,标量数据也被看作是(1×1)的数组 一维数组的创建 创建一维数组的几种方法:(e_two_14.m) 直接输入法: ...

  7. Python数组列表(List)

    Python数组列表 数组是一种有序的集合,可以随时添加和删除其中的元素. 一.数组定义: 数组是最常用的Python数据类型,它可以作为一个方括号内的逗号分隔值出现. 数组的数据项不需要具有相同的类 ...

  8. NYOJ-851寻找最大数(二),栈贪心!

    寻找最大数(二) 时间限制:1000 ms  |  内存限制:65535 KB 难度:2 描述 给你一个数字n(可能有前缀0). 要求从高位到低位,进行 进栈出栈 操作,是最后输出的结果最大. 输入 ...

  9. [BZOJ1264][AHOI2006]基因匹配Match(DP + 树状数组)

    传送门 有点类似LCS,可以把 a[i] 在 b 串中的位置用一个链式前向星串起来,由于链式前向星是从后往前遍历,所以可以直接搞. 状态转移方程 f[i] = max(f[j]) + 1 ( 1 &l ...

  10. [NOIP2006] 提高组 洛谷P1064 金明的预算方案

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