Ubuntu 16.04下docker ce的安装
卸载版本的docker
sudo apt-get remove docker docker-engine docker.io
安装可选内核模块
从 Ubuntu 14.04 开始,一部分内核模块移到了可选内核模块包 ( linux-image-extra-* ) ,以
减少内核软件包的体积。正常安装的系统应该会包含可选内核模块包,而一些裁剪后的系统
可能会将其精简掉。 AUFS 内核驱动属于可选内核模块的一部分,作为推荐的 Docker 存储层
驱动,一般建议安装可选内核模块包以使用 AUFS 。如果没有安装的话可以使用下面的命令安装
sudo apt-get update
sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual
安装Docker CE
由于 apt 源使用 HTTPS 以确保软件下载过程中不被篡改。因此,我们首先需要添加使用
HTTPS 传输的软件包以及 CA 证书。
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
鉴于国内网络问题,强烈建议使用国内源,官方源请在注释中查看。为了确认所下载软件包的合法性,需要添加软件源的 GPG 密钥
curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
# 官方源
#curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
然后,我们需要向 source.list 中添加 Docker 软件源
sudo add-apt-repository \
"deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu \
$(lsb_release -cs) \
stable"
# 官方源
# sudo add-apt-repository \
# "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
# $(lsb_release -cs) \
# stable
更新 apt 软件包缓存,并安装 docker-ce
sudo apt-get update
sudo apt-get install docker-ce
启动docker CE
sudo systemctl enable docker
sudo systemctl start docker
测试安装是否正确
sudo docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
ca4f61b1923c: Pull complete
Digest: sha256:445b2fe9afea8b4aa0b2f27fe49dd6ad130dfe7a8fd0832be5de99625dad47cd
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://cloud.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/engine/userguide/
如果出现上述信息,说明安装成功
镜像加速
由于国外的镜像有时候网络访问过慢,需要使用国内的镜像加速
对于使用 systemd 的系统,请在 /etc/docker/daemon.json 中写入如下内容(如果文件不存
在请新建该文件)
{
"registry-mirrors": [
"https://registry.docker-cn.com"
]
}
之后重启启动系统
sudo systemctl daemon-reload
sudo systemctl restart docker
Ubuntu 16.04下docker ce的安装的更多相关文章
- Ubuntu 16.04下docker ce的安装(待完善)
参见:https://www.cnblogs.com/senlinyang/p/8203191.html https://blog.csdn.net/qq_34906391/article/detai ...
- Ubuntu 16.04下EasyOpenJTAG+OpenOCD的安装和使用【转】
本文转载自:http://www.linuxdiyf.com/linux/24086.html Ubuntu 16.04下EasyOpenJTAG+OpenOCD的安装和使用 发布时间:2016-09 ...
- Ubuntu(16.04) 下如何修改(安装)arm-linux-gcc编译器
ubuntu下如何修改(安装)arm-linux-gcc编译器 将gcc解压到根目录 sudo tar xjf arm-linux-gcc-4.3.2.tar.bz2 -C / 查看原来的环境变量 e ...
- Ubuntu 16.04下deb文件的安装
pkg 是Debian Package的简写,是为Debian 专门开发的套件管理系统,方便软件的安装.更新及移除.所有源自Debian的Linux发行版都使用dpkg,例如Ubuntu.Knoppi ...
- ubuntu 16.04下node和pm2安装
一.安装node,这里安装9.0的版本,安装其它版本直接到https://deb.nodesource.com/setup_9.x找相应版本的更改既可 1.sudo apt-get remove no ...
- Ubuntu 16.04 下简单安装使用golang之备忘
刚开始学习Go语言,这里记录下我在Ubuntu 16.04下安装使用golang的过程,方便以后查询. 一.安装 1.添加源 如果使用默认的源安装golang的话,版本太低,只到1.6 ...
- Ubuntu 16.04下编译安装Apache2.4和PHP7结合
Ubuntu 16.04下编译安装Apache2.4和PHP7结合,并安装PDOmysql扩展. 1.编译安装apache2.4.20 1 第一步: ./configure --prefix=/usr ...
- Ubuntu 16.04下安装MacBuntu 16.04 TP 变身Mac OS X主题风格
Ubuntu 16.04下安装MacBuntu 16.04 TP 变身Mac OS X主题风格 sudo add-apt-repository ppa:noobslab/macbuntu sudo a ...
- Ubuntu 16.04 下使用Xampp
Ubuntu 16.04 下使用Xampp 什么是Xampp? XAMPP(Apache+MySQL+PHP+PERL) 是一个功能强大的建站集成软件包.这个软件包原来的名字是 LAMPP,但是为了避 ...
随机推荐
- animation效果
添加一个颜色灰渐变的动画效果. <!DOCTYPE html><html lang="en"><head> <meta charset=& ...
- 启动Tomcat服务时,出现org.apache.catalina.startup.VersionLoggerListener报错
启动Tomcat服务时,出现org.apache.catalina.startup.VersionLoggerListener报错解决办法:打开Tomcat安装后目录,进入conf文件夹,找到配置文件 ...
- thinkphp标签实现bootsrtap轮播carousel实例
thinkphp标签实现bootsrtap轮播carousel实例由于轮播carousel第一个div需要设置active样式才能正常显示,上面的圆点也同样需要数字,使用volist标签在循环的同时可 ...
- iphone6 inline-flex兼容问题
在编写微信端页面时,遇到这样的问题:position属性为flex的导航栏,其li标签在其余设备上显示正常,但在iphone6上浮动错误. 究其原因,是iphone6不支持position属性中的fl ...
- USB开发库STSW-STM32121文件分析
hw_config.c: 该文件中包含系统配置的函数. usb_desc.c:各种描述符 usb-endp.c:就两个函数分别处理端点1的IN和端点2的OUT. usb_istr.c: 该文件中只有一 ...
- Python入门之PyCharm中目录directory与包package的区别
对于Python而言,有一点是要认识明确的,python作为一个相对而言轻量级的,易用的脚本语言(当然其功能并不仅限于此,在此只是讨论该特点),随着程序的增长,可能想要把它分成几个文件,以便逻辑更加清 ...
- python百分号%—%s、%d、%f
百分号%表示占位符,在后续通过%传入真实的值 %s 拼接字符串,实际可以接受任何类型的值 %d 只能拼接整数数字 %.nf 四舍五入拼接浮点数,n表示保留到小数点后n位,不加.n默认保留6位小数 ...
- PHP进程及进程间通信
一.引言 进程是一个具有独立功能的程序关于某个数据集合的一次运行活动.换句话说就是,在系统调度多个cpu的时候,一个程序的基本单元.进程对于大多数的语言都不是一个陌生的概念,作为"世界上最好 ...
- ajax请求的同步异步问题
前言 在做项目的过程中遇到一个bug就是:使用了alert语句后,代码才能正确执行,没使用就执行不成功. 后来我就用把console.log,代码就不能正确执行. 于是我就去比较了下consol.lo ...
- AMS1117稳压模块
AMS1117有降压稳压的作用.我们使用的是AMS1117-5,输出5V电压. 理论参数: 输出条件 最小值 理论值 最大值 理论电路图: 引脚图: