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 ...
随机推荐
- Access应用笔记<四>-一个完整的自动化报表搭建过程
距离之前的三篇日志已经很久啦,今天终于完成了一个比较完整的自动化报表搭建过程 基于公司数据保密原则,样板就不放到网上来了,简单说一下背景: 这次access实现的功能包括: 1)为部门整体搭建了一个员 ...
- R语言——七月
这两个月没有写什么代码.也没做什么大项目,基本就是对以前写的那个用ggplot2可视化数据的项目做一些增增补补,大部分技术难关都在ggplot2和R语言EXCEL处理这里解决并总结了.然后业余帮人修改 ...
- CF#138 div 1 A. Bracket Sequence
[#138 div 1 A. Bracket Sequence] [原题] A. Bracket Sequence time limit per test 2 seconds memory limit ...
- Discuzx系统 CSS 编码规范,CSS属性书写顺序
1. 属性写在一行内,属性之间.属性名和值之间以及属性与“{}”之间须有空格,例如:.class { width: 400px; height: 300px; } 2. 属性的书写顺序: ...
- Linux Swap分区设定
因为准备在linux上面安装Oracle数据库,据说swap分区小于4G容易失败,天啦噜的我连swap分区是啥都不是非常清楚, 大概有个印象吧,但先搞大了再说. 测试证明Ubuntu14默认的swap ...
- 启动调试IIS时,vs无法在 Web 服务器上启动调试。Web 服务器未能找到请求的资源。 有关详细信息,请单击“帮助”。
问题截图 1.检查 是否设置了本地IIS 2.检查IIS端口是否为80 3.默认网站设置是否正确 可参考,查看网站绑定是否正确
- iOS 向客户发送xcarchive文件(整理中)
由于安全的原因,客户不会把app的 distribution provisioning profile给开发者的,但是可以给一个development provisioning profile.这种情 ...
- Python多进程(2)——mmap模块与mmap对象
本文介绍Python mmap模块与mmap对象的用法. mmap 模块提供“内存映射的文件对象”,mmap 对象可以用在使用 plain string 的地方,mmap 对象和 plain stri ...
- NEFU 558 迷宫寻路
题目链接 简单搜索题 #include <cstdio> #include <iostream> #include <cstring> using namespac ...
- linux连接远程桌面
#!/usr/bin/env python3 #-*-encoding:utf-8-*- import re import os import urllib.request, urllib.parse ...