首先需要说明的是,根据Docker的官方文档,Docker的安装必须在64位的机子上。这里只说明Ubuntu 14.04与16.04,我成功安装成功过Ubuntu 14.04,16.04还没有测试过,若为Ubuntu 12.04参考官方文档。

官方文档地址:https://docs.docker.com/engine/installation/linux/ubuntulinux/

建议先按照官方文档步骤安装,若读不懂可以参考我写的,有问题请给我留言

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------我是美丽的分割线----------------------------------------------------------------------------------------------------------------------------------------------------------------------

1.#检查内核是否3.10以上,Docker最好的运行的环境为3.10以上,通过下面的命令查看

  $ uname -r
  3.11.0-15-generic

2.#Update apt sources.

  $ sudo apt-get update

3.#Update package information, ensure that APT works with the https method, and that CA certificates are installed.
  $ sudo apt-get install apt-transport-https ca-certificates

4.#Add the new GPG key

  $ sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

5.#如果为ubuntu 14.04

  $ echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list

 #如果为ubuntu 16.04

  $ echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list

6.#Update the APT package index

  $ sudo apt-get update

7.#Update your package manager

   $ sudo apt-get update

8.#Update your package manager

  $ sudo apt-get update

9.#Install the recommended packages

  $ sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual

10.#Update your APT package index

  $ sudo apt-get update

11.#Install Docker

  $ sudo apt-get install docker-engine

12.#Start the docker daemon

  $ sudo service docker start

13.#Verify docker is installed correctly

  $ sudo docker run hello-world

14.#官方文档有设置非sudo可以运行的步骤,想设置的自己参考官方文档

  #Adjust memory and swap accounting

  #Log into Ubuntu as a user with sudo privileges.

  #Edit the /etc/default/grub file.

  #Set the GRUB_CMDLINE_LINUX value as follows:

  GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"

  sudo update-grub

  sudo init 6

15.#Configure a DNS server for use by Docker,这一步很重要,如果不设置会使Docker拉取来的images无法正常链接网络

  sudo nano /etc/default/docker

  DOCKER_OPTS="--dns 8.8.8.8"(这里将8.8.8.8设置为自己的DNS,查找DNS的命令nm-tool)

  sudo service docker restart

其他的问题看官方文档,看是否是有的东西没安装,一切依官方为主。

总结:读懂英文文档很重要,安装软件特别需要读懂英文文档,有问题就Google,百度这方面有点弱,Google上的也是英文O(∩_∩)O哈哈哈~

  

Ubuntu install Docker的更多相关文章

  1. Install Docker on Ubuntu

    Install Docker on Ubuntu Estimated reading time: 17 minutes Docker is supported on these Ubuntu oper ...

  2. How To Install Docker On Ubuntu 18.04

    Docker is an increasingly popular software package that creates a container for application developm ...

  3. Install Docker on Mac OS X(转)

    Install Docker on Mac OS X You can install Docker using Boot2Docker to run docker commands at your c ...

  4. 基于ubuntu的docker安装

    系统版本:Ubuntu16.04 docker版本:18.02.0 Ubuntu 系统的内核版本>3.10(执行 uname -r 可查看内核版本)   在安装前先简单介绍一下docker,按照 ...

  5. ubuntu安装docker以及基本用法

    ubuntu安装docker以及基本用法 一.安装 安装前先更新apt-get源到最新版本 apt-get update 使用ubuntu自带的docker安装包安装docker apt-get in ...

  6. centos Install Docker

    安装必备软件 $ yum -y install iptables iptables-services net-tools vim wget $ wget -P ~ https://github.com ...

  7. install docker swarm on centos

    ref: https://sonnguyen.ws/install-docker-docker-swarm-centos7/ https://hostadvice.com/how-to/how-to- ...

  8. CentOS7 Install Docker(转)

    https://linux.cn/article-4340-1.html CentOS 7 中 Docker 的安装 Docker 软件包已经包括在默认的 CentOS-Extras 软件源里.因此想 ...

  9. Ubuntu 安装Docker

    参考:官网 安装依赖包: $ sudo apt-get update $ sudo apt-get install -y --no-install-recommends \ linux-image-e ...

随机推荐

  1. 数据库大数据处理---复制(SQLServer)

    复制? 复制起初并不是用于作为高可用性功能而设计的,实际上复制的概念就像其名称一样,用于复制数据.比如将某个库中的数据“复制”到另一个库,到另一个实例中,由OLTP复制到OLAP环境中,由某数据中心复 ...

  2. CSS3实现阴阳鱼

    直接上代码: <!doctype html> <html> <head> <meta charset="utf-8" /> < ...

  3. Spring3.0目录

    (1)Spring 入门知识 (2)IoC/DI基本思想的演变 (3)深入理解IoC/DI (4)Spring的简单demo

  4. visio二次开发初始化问题

    (转发请注明来源:http://www.cnblogs.com/EminemJK/) 问题: axDrawingControl1初始化失败((System.ComponentModel.ISuppor ...

  5. sublime 编译运行C程序

    { "cmd": ["gcc", "${file}", "-o","${file_path}/${file_b ...

  6. JDK source 之 LinkedHashMap原理浅谈

    注:本文参考JDK1.7.0_45源码. LinkedHashMap是基于HashMap实现的数据结构,与HashMap主要的不同为每个Entry是使用双向链表实现的,并且提供了根据访问顺序进行排序的 ...

  7. css content 的 attr 用法 (实现悬浮提示)

    content 的attr 实现 鼠标悬浮 显示 悬浮提示, content 属性与 :before 及 :after 伪元素配合使用,来插入生成内容. 方法/步骤 1 <div> < ...

  8. 2016 GitHub章鱼猫观察报告之开源统计

    导读 GitHub 又发布了一年一度的章鱼猫观察报告.在这个报告中,分别对开源和社区做了一些有趣的统计,现将其中一些有趣的数据和趋势撷取出来分享给大家.完整的报告请移步Github. GitHub 上 ...

  9. 核心动画 - CAKeyframeAnimation 简单应用

    核心动画: 登录按钮的抖动效果: CAKeyframeAnimation * kfAnimation = [CAKeyframeAnimation animationWithKeyPath:@&quo ...

  10. 使用http.sys,让delphi 的多层服务飞起来

    核心提示:一直以来,delphi 的网络通讯层都是以indy 为主,虽然indy 的功能非常多,涉及到网络服务的各个方面,但是对于大多数多层服务来说,就是需要一个快速.稳定.高效的传输层.Delphi ...