首先来一个官网安装教程链接: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. 大哥带的Orchel数据库的报错注入

    0X01 使用报错注入需要使用类似 1=[报错语句],1>[报错语句],使用比较运算符,这样的方式进行报错注入(MYSQL仅使用函数报错即可),类似mssql报错注入的方式. news.jsp? ...

  2. 使用私有仓库(Docker Registry 2.0)管理镜像

    1. 执行以下命令新建并启动一个Docker Registry 2.0 docker run -d -p 5000:5000 --restart=always --name registry2 reg ...

  3. Linux shell - cut命令用法(转载)

    cut  [-bn] [file] 或 cut [-c] [file]  或  cut [-df] [file] 使用说明 cut 命令从文件的每一行剪切字节.字符和字段并将这些字节.字符和字段写至标 ...

  4. Promethus

    https://blog.csdn.net/zl1zl2zl3/article/details/74332437

  5. Django学习之Form表单

    一.Form介绍 普通方式手写注册功能 使用form组件实现注册功能 二.Form那些事儿 1.常用字段与插件 initial error_messages password radioSelect ...

  6. java hashset输出

    for (Map.Entry<String, String> me : id_label_map.entrySet()) { System.out.println(me.getKey() ...

  7. Eclipse高版本无法兼容FatJar的问题解决

    发现eclipse打包jar无法连带打包第三方lib,于是选择安装插件fatjar,现在说明fatjar安装过程: 1.安装方法:   1)下载安装:   https://sourceforge.ne ...

  8. day66—angularJS学习笔记-表达式

    转行学开发,代码100天——2018-05-21 angular的变量数据初始化: ng-init="quantity=1;cost=30;student={firstName:'李',la ...

  9. IDEA maven 阿里云镜像 下载jar失败

    我在使用IDEA搭建SpringCloud项目的时候,发现很多spring cloud 包总是下载不了.maven配置了阿里云镜像.在换了一下新版的镜像地址以后就可以下包了. 官方答疑:新版maven ...

  10. HTML5——新表单元素 表单属性 语义元素

    表单元素 新的表单元素 datalist——输入域选项列表 keygen——提供一种验证用户的可靠方法 output——不同类型的输出,比如计算或脚本输出 表单属性 <form> / &l ...