首先来一个官网安装教程链接:https://docs.docker.com/install/linux/docker-ce/ubuntu/

目前docker主要有docker-CE 与 docker-EE

docker-ce开源免费,基本上在日常学习及工作中足够了。

docker-EE企业版收费,两者之间的区别,可以借助https://www.cnblogs.com/atuotuo/p/6668233.html 这篇文章

官方博客有更详细说明:https://blog.docker.com/2017/03/docker-enterprise-edition/

第一步:如果之前安装过docker,执行下面命令删除

apt-get remove docker docker-engine docker.io

删除后执行sudo apt-get update更新软件

第二步:安装必要的软件包以允许apt通过HTTPS使用存储库,具体如下:

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

第三步:添加GPG密钥,可以添加官方的和阿里的,我添加 的阿里的,国内的快啊

// 官方
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
// 阿里
curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -

添加完毕后可以执行以下命令验证:

sudo apt-key fingerprint 0EBFCD88

正常情况下会输出如下内容:

pub   rsa4096 2017-02-22 [SCEA]
9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
uid [ 未知 ] Docker Release (CE deb) <docker@docker.com>
sub rsa4096 2017-02-22 [S]

说明 Ok,继续

第四步:设定稳定仓储库

也可以不设置,不设置默认使用官方的,具体是:deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable
同样可以用阿里 的镜像:设置命令如下:

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

其中的lsb_release -cs相当于一个函数,直接获取Ubuntu下的最新版本

设置完毕再次执行sudo apt-get update命令更新 软件包。

第五步:安装docker,如下:

sudo apt-get -y install docker-ce

安装完成后,运行

#如果想要开机启动
systemctl enable docker
#启动docker
systemctl start docker #查看docker信息
docker info #如果需要停止docker服务
systemctl stop docker

如果  查看docker信息可以看到输出的docker相关的信息,证明安装成功。

ubuntu下docker安装的更多相关文章

  1. 【云计算】ubuntu下docker安装配置指南

    Docker Engine安装配置 以下描述仅Docker在Ubuntu Precise 12.04 (LTS).Ubuntu Trusty 14.04 (LTS).Ubuntu Wily 15.10 ...

  2. ubuntu 下 docker安装

    1移除以前安装docker sudo apt-get remove docker docker-engine docker-ce docker.io 2 安装包以允许apt通过HTTPS使用存储库 s ...

  3. Mac 下 docker安装

    http://www.th7.cn/system/mac/201405/56653.shtml Mac 下 docker安装 以及 处理错误Cannot connect to the Docker d ...

  4. ubuntu16.04下docker安装和简单使用(转)

    ubuntu16.04下docker安装和简单使用   转自:https://www.cnblogs.com/hupeng1234/p/9773770.html 前提条件 操作系统 docker-ce ...

  5. 在Ubuntu下编译安装GreatSQL

    在Ubuntu下编译安装GreatSQL 本次介绍如何利用Docker构建Ubuntu环境,并将GreatSQL源码编译成二进制文件. 1.准备工作 先创建本次Docker的workdir为 /dat ...

  6. Torch7在Ubuntu下的安装与配置

    Torch7的本系列教程的主要目的是介绍Torch的入门使用.今天首先分享一下Torch7的安装.(在Ubuntu14.04安装torch7) 为什么选择Torch Torch的目标是在建立科学算法的 ...

  7. ubuntu下git安装及使用

    ubuntu下git安装及使用   其实,好几个月前,就已经安装好了,可是一直搁置在那儿,所以密码等一些其它细节都忘的差不多了,所以今天就重新部署了一下,并开始积极使用......... 1,git ...

  8. premake Ubuntu下的安装

    premake是个跨平台的编译工具,先看看在Ubuntu下怎么安装. 首先下载,在/usr目录下: sudo wget -O premake-4.4-beta4-linux.tar.gz http:/ ...

  9. linux,windows,ubuntu下git安装与使用

    ubuntu下git安装与使用:首先应该检查本地是否已经安装了git ,如果没有安装的话,在命令模式下输入 sudo apt-get install git 进行安装 输入git命令查看安装状态及常用 ...

随机推荐

  1. (转)python selenium-webdriver 元素操作之鼠标和键盘事件

    参考资料:https://blog.csdn.net/zh175578809/article/details/76767748 参考资料2:https://blog.csdn.net/qq_41817 ...

  2. sql数据库相关语句

    易错点 Where需要放在from语句之后:where中不能出现聚合函数(就是能够将几行一列合并为一行一列的函数,比如max,min,avg,count()):但是可以出现其他,如比较符,getdat ...

  3. Android由出生年月日计算年龄(周岁)

    先从String类型的出生日期(“yyyy-MM-dd”)中提取int类型的年.月.日:再计算岁数. 程序如下: /** * 根据出生日期计算年龄的工具类BirthdayToAgeUtil */ pu ...

  4. 四十、python中的生成器和迭代器

    A.生成器(包含yield的就是生成器) def func(): print(11) yield 1 print(22) yield 2 print(33) yield 3 print(44) yie ...

  5. org.hibernate.MappingException: An AnnotationConfiguration instance is required to use <mapping clas

    在Hibernate中使用annotation出现错误.如题目所示. HibernateSessionFactory类中: //    private  static Configuration co ...

  6. linux shell 中"2>&1"含义-完美理解-费元星

    笨鸟先飞,先理解.   脚本是:      nohup /mnt/Nand3/H2000G  >/dev/null  2>&1  &      对于& 1 更准确的 ...

  7. JS - defer 和 async

    普通 <script src="script.js"></script> 没有 defer 或 async,浏览器会立即加载并执行指定的脚本,"立 ...

  8. 禁止SYS和SYSTEM用户远程登录Oracle oracle的sys和system默认密码

    alter system set remote_login_passwordfile=none scope=spfile; system默认:manager sys默认:change_on_insta ...

  9. 关于OPC连接读写下位机PLC(转)

    原文转自:http://blog.csdn.net/u012252959/article/details/49736285?locationNum=11 开发OPC客户端程序时,首先应该生成OPC服务 ...

  10. java.io.FileNotFoundException: /usr/local/hadoop/logs/fairscheduler-statedump.log(权限不够)解决方案

    问题描述:Linux虚拟机内使用hadoop 解决方案: $ su 密码:****** # chown hadoop 文件名 进入超级管理员,为hadoop用户分配该文件的权限. 完美解决: