首先来一个官网安装教程链接: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. oracle11g安装补丁升级

    检查当前数据库CPU和PSU补丁信息 方法一: 登录数据库,检查DBA_REGISTRY_HIST视图. SYS@orcl> select *from dba_registry_history; ...

  2. ACCESS数据库注入

    0X01 我们想来了解一下access数据库 Access注入是暴力猜解 Access数据结构(access只有一个数据库) Access数据库 表名 列名 数据 没有库这个概念 只有表这个概念 这应 ...

  3. Singleton(Java)

    1.定义私有静态易变的类变量2.定义getInstance静态方法 2.1.若静态变量为null,则在同步类类型的同时判断静态实例是否为null, 是null则创建新实例赋给静态变量 2.2.不为nu ...

  4. npm-package-lock.json

    npm notice created a lockfile as package-lock.json. You should commit this file. https://docs.npmjs. ...

  5. [论文笔记] Fine-Grained Head Pose Estimation Without Keypoints

    Fine-Grained Head Pose Estimation Without Keypoints 简介 head pose estimation 经典论文,使用CNN预测三个角度值,pitch, ...

  6. leetcode-mid-others-169. Majority Element¶

    mycode  54.93% class Solution(object): def majorityElement(self, nums): """ :type num ...

  7. p1848 [USACO12OPEN]书架Bookshelf

    分析 单调队列优化dp即可 正确性显然,详见代码 代码 #include<bits/stdc++.h> using namespace std; #define int long long ...

  8. 卡方检验(python代码实现)

     https://study.163.com/provider/400000000398149/index.htm?share=2&shareId=400000000398149( 欢迎关注博 ...

  9. maven 安装jar包命令

    以 spring-context-support-3.1.0.RELEASE.jar 为例,在 @3图中已经给出这个 jar 包的 groupId,artifactId,version信息,手动安装的 ...

  10. 【Spring】---属性注入

    一.Spring注入属性(有参构造和[set方法]) 注意:在Spring框架中只支持set方法.有参构造方法这两种方法. 使用有参数构造方法注入属性(用的不多,但需要知道): 实体类 package ...