Ubuntu install Docker
首先需要说明的是,根据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的更多相关文章
- Install Docker on Ubuntu
Install Docker on Ubuntu Estimated reading time: 17 minutes Docker is supported on these Ubuntu oper ...
- How To Install Docker On Ubuntu 18.04
Docker is an increasingly popular software package that creates a container for application developm ...
- 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 ...
- 基于ubuntu的docker安装
系统版本:Ubuntu16.04 docker版本:18.02.0 Ubuntu 系统的内核版本>3.10(执行 uname -r 可查看内核版本) 在安装前先简单介绍一下docker,按照 ...
- ubuntu安装docker以及基本用法
ubuntu安装docker以及基本用法 一.安装 安装前先更新apt-get源到最新版本 apt-get update 使用ubuntu自带的docker安装包安装docker apt-get in ...
- centos Install Docker
安装必备软件 $ yum -y install iptables iptables-services net-tools vim wget $ wget -P ~ https://github.com ...
- install docker swarm on centos
ref: https://sonnguyen.ws/install-docker-docker-swarm-centos7/ https://hostadvice.com/how-to/how-to- ...
- CentOS7 Install Docker(转)
https://linux.cn/article-4340-1.html CentOS 7 中 Docker 的安装 Docker 软件包已经包括在默认的 CentOS-Extras 软件源里.因此想 ...
- Ubuntu 安装Docker
参考:官网 安装依赖包: $ sudo apt-get update $ sudo apt-get install -y --no-install-recommends \ linux-image-e ...
随机推荐
- codevs1228 苹果树
题目描述 Description 在卡卡的房子外面,有一棵苹果树.每年的春天,树上总会结出很多的苹果.卡卡非常喜欢吃苹果,所以他一直都精心的呵护这棵苹果树.我们知道树是有很多分叉点的,苹果会长在枝条的 ...
- [Python] 学习笔记之MySQL数据库操作
1 Python标准数据库接口DB-API介绍 Python标准数据库接口为 Python DB-API,它为开发人员提供了数据库应用编程接口.Python DB-API支持很多种的数据库,你可以选择 ...
- PHP大数(浮点数)取余
一般我们进行取余运算第一个想到的就是用百分号%,但当除数是个很大的数值,超出了int范围时,这样取余就不准确了. php大数(浮点数)取余函数 /** * php大数取余 * * @param int ...
- GitHub使用教程
一直以来都想使用Git来管理自己平时积累的小代码,就是除了工作之外的代码了.有时候自己搞个小代码,在公司写了,就要通过U盘或者网盘等等一系列工具进行Copy,然后回家才能继续在原来的基础上作业.Cop ...
- iphone的click导致div变黑
-webkit-tap-highlight-color这个属性只用于iOS (iPhone和iPad).当你点击一个链接或者通过Javascript定义的可点击元素的时候,它就会出现一个半透明的灰色背 ...
- Linux下用于查看系统当前登录用户信息 w命令
作为系统管理员,你可能经常会(在某个时候)需要查看系统中有哪些用户正在活动.有些时候,你甚至需要知道他(她)们正在做什么.本文为我们总结了4种查看系统用户信息(通过编号(ID))的方法. 1. 使用w ...
- 瀑布流布局——jquery
首先确定定位,因为.box的宽度是确定的,根据屏幕的宽度来调整.box的列数,所以#content的宽度是随着.box的列数变化而变化的,并且需要保持相对于body居中. 因此需要给#content添 ...
- Eclipse关闭XML文件验证的方法
XML的编写是否符合规范,可以通过XML Schema或DTD进行验证,但有时候电脑本来就很卡,而且XML的某些错误并未导致程序无法运行的情况下,暂时关闭XML的验证也算不错的选择. 如web.xml ...
- 35.两链表的第一个公共结点[Find the first common node of two linked list]
[题目] 两个单向链表,找出它们的第一个公共结点. 链表的结点定义为: C++ Code 123456 struct ListNode { int m_nKey; ...
- 常用语句if,for,while
一.变量赋值 a = 3 b = a a = 5 print a,b 5,3 变量命名规则: 1.显式 2.nums_of_alex_gf = 19 3.NumsOfAlexGf = 2 4. ...