本文开发环境为Ubuntu 16.04 LTS 64位系统,通过apt的docker官方源安装最新的Docker CE(Community Edition),即Docker社区版,是开发人员和小型团队的理想选择。

开始安装
由于apt官方库里的docker版本可能比较旧,所以先卸载可能存在的旧版本:
$ sudo apt-get remove docker docker-engine docker-ce docker.io

更新apt包索引:
$ sudo apt-get update

安装以下包以使apt可以通过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
1
在生产系统上,可能会需要应该安装一个特定版本的Docker CE,而不是总是使用最新版本:
列出可用的版本:

$ apt-cache madison docker-ce

选择要安装的特定版本,第二列是版本字符串,第三列是存储库名称,它指示包来自哪个存储库,以及扩展它的稳定性级别。要安装一个特定的版本,将版本字符串附加到包名中,并通过等号(=)分隔它们:

$ sudo apt-get install docker-ce=<VERSION>

验证docker
查看docker服务是否启动:
$ systemctl status docker

若未启动,则启动docker服务:
$ sudo systemctl start docker

经典的hello world:
$ sudo docker run hello-world

有以上输出则证明docker已安装成功!
---------------------
作者:一名啥都不会的见习工程师
来源:CSDN
原文:https://blog.csdn.net/bingzhongdehuoyan/article/details/79411479
版权声明:本文为博主原创文章,转载请附上博文链接!

ubuntu16 安装docker的更多相关文章

  1. ubuntu16安装docker环境详细说明

    安装前说明: 本文将介绍在ubuntu16.04系统下安装和升级docker.docker-compose.docker-machine. docker:有两个版本:docker-ce(社区版)和do ...

  2. ubuntu16安装docker

    首先确保curl已经安装! 然后执行: curl -sSL https://get.docker.com/|sudo sh 这个是通过脚本的方式安装docker. 运行命令测试 sudo docker ...

  3. (原)ubuntu14及ubuntu16中安装docker

    转载请注明出处: http://www.cnblogs.com/darkknightzh/p/5653739.html 参考网址: http://blog.csdn.net/yangzhenping/ ...

  4. docker学习笔记(一)—— ubuntu16.04下安装docker

    docker学习笔记(一)—— ubuntu16.04下安装docker 原创 2018年03月01日 14:53:00 标签: docker / ubuntu 1682 本文开发环境为Ubuntu ...

  5. 如何在ubuntu16上安装docker

    自从用了docker,就一直无法忘怀,省去了很多部署成本.特别是可以统一开发环境和部署环境,在实际开发中有很大的实用价值. 作为一个伪全栈,我是力推大家学习docker技术的.这种共享linux内核的 ...

  6. ubuntu16安装最新版docker

    ubuntu16.04安装最新版docker.docker-compose.docker-machine https://www.cnblogs.com/tianhei/p/7802064.html ...

  7. 在Ubuntu16.04.4上安装docker

    在Ubuntu16.04.4上安装docker 一.环境准备     首先我们需要一台Ubuntu16.04 虚拟机或者真机,其次,我们对其进行环境配置.       1.1.移除已经安装过的dock ...

  8. Ubuntu16.04安装Docker、nvidia-docker

    Ubuntu16.04安装Docker.nvidia-docker Docker安装 1.更换国内软件源,推荐中国科技大学的源,稳定速度快(可选) sudo cp /etc/apt/sources.l ...

  9. Linux安装docker(ubuntu16.04和centos7.4)

    ubuntu16.04版本 1.安装依赖 sudo apt-get install apt-transport-https ca-certificates software-properties-co ...

随机推荐

  1. Python 用ctypes观察Python对象的内存结构 -- (转)

    !!!强烈推荐的好文章!!! 对象的两个基本属性 Python所有对象结构体中的头两个字段都是相同的: refcnt:对象的引用次数,若引用次数为0则表示此对象可以被垃圾回收了. typeid:指向描 ...

  2. “adb server is out of date.

    今天,久未出现的著名的“adb server is out of date.  killing”又发生了,在此,将解决方法记下,以便日后查看. 1. 错误信息: C:\Users\lizy>ad ...

  3. 编写jquery Plugin

    编写jquery插件的原则 1.给$.fn绑定函数,实现插件的代码逻辑 2.插件函数最后要return this,以支持链式调用 3.插件函数要有默认值,绑定在$.fn.<pluginName& ...

  4. 64_d1

    DSDP-5.8-15.fc26.i686.rpm 13-Feb-2017 22:06 658926 DSDP-5.8-15.fc26.x86_64.rpm 13-Feb-2017 22:09 653 ...

  5. caffe Python API 之LRN

    net.mylrn = caffe.layers.LRN(net.pool1,local_size=5,alpha=1e-4,beta=0.75) 输出: layer { name: "my ...

  6. SAE如何使用Git

    了解Git及远程git仓库 请先看博文<Git入门及上传项目到github中>,弄懂了之后我相信我下面说的就相当于废话了. SAE的git远程仓库就相当于github. 向SAE的远程仓库 ...

  7. 学习1:python输入输出

    1. 输出 >>> print "hello world" hello world >>> print 'hello world' hello ...

  8. FineReport——插入行策略

    1.空值是默认的选项,即每次插入新行时,格子都是空白的. 2.原值即单元格中原有内容是什么,就复制到新增的格子中,一般适用于单元格是使用公式定义的, 在插入单元格时,公式会保留下来. 3.默认值即通过 ...

  9. Leetcode 之Longest Valid Parentheses(39)

    有一定的难度.用堆栈记录下所有左符的位置,用变量记录下孤立右符的位置. int longestValidParentheses(const string& s) { stack<int& ...

  10. LeetCode解题报告—— Permutations & Permutations II & Rotate Image

    1. Permutations Given a collection of distinct numbers, return all possible permutations. For exampl ...