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 ...
随机推荐
- List拆分成多个集合
如果对一组大的集合进行操作,想分组进行,比如批量新增10000条数据,想100条分成一个集合分成100个集合,对集合进行操作100次,用C#如何编写,这里记录下代码如下 //构造被分隔的集合 List ...
- Asp.Net HttpContext.RemapHandler 用法
最近在看HttpHandler映射过程文章时发现Context对象中有一个RemapHandler方法,它能将当前请求映射到指定的HttpHandler处理,可跳过系统默认的Httphandler.它 ...
- hdu4790 Just Random (数学?)
acm.hdu.edu.cn/showproblem.php?pid=4790 题意:x随机取a~b,y随机取c~d,求(x+y)mod p = m 的概率.(结果用分数表示) 题解: 数学概率题,运 ...
- MySQL检查重复索引工具-pt-duplicate-key-checker
在MySQL中是允许在同一个列上创建多个索引的,示例如下: mysql --socket=/tmp/mysql5173.sock -uroot -p mysql> SELECT VERSION( ...
- Java 程序的内存泄露问题分析
什么是内存泄露? 广义的Memory Leak:应用占用了内存,但是不再使用(包括不能使用)该部分内存 狭义的Memory Leak:应用分配了内存,但是不能再获取该部分内存的引用(对于Java,也不 ...
- 搭建 Windows Server 2003 + IIS6.0 + FastCGI + PHP5.3.29 + MySQL5.5.38 + Memcached1.2.6
一.下载相关软件: 1.VC9运行库 即VISUAL C++ 2008 自PHP5.3.0开始,PHP提供VC2008编译版,需要安装VC++ 2008的运行库. [微软官方下载] http://ww ...
- 【Alpha版本】 第三天 11.9
一.站立式会议照片: 二.项目燃尽图: 三.项目进展: 成 员 昨天完成任务 今天完成任务 明天要做任务 问题困难 心得体会 胡泽善 注册界面的实现 填写招聘时用户填写各个日期到可以使用工具方便选择日 ...
- Alpha版本十天冲刺——Day 10
站立式会议 最后一天,很高兴我们做出了跟预期差不多的版本,实现了基本功能,虽然还有一些bug,但是下一阶段我们会继续加油! 会议总结 队员 今天完成 遇到的问题 感想 鲍亮 功能细节更改 我的手机运行 ...
- HMTL判断ie版本
html判断IE版本 1. <!--[if !IE]><!--> 除IE外都可识别 <!--<![endif]--> 2. <!--[if IE]> ...
- Vue in 2016
原文链接:Vue in 2016 Vue 作者尤雨溪对 Vue 在 2016 年的总结以及未来的展望 现在已经是2016的尾声了!在这过去的12个月里,Vue的持续增长速度已经超过了我的预期--这个项 ...