博客
关于我
Ubuntu 16.04安装docker详细步骤
阅读量:716 次
发布时间:2019-03-21

本文共 1046 字,大约阅读时间需要 3 分钟。

安装Docker CE的Apt源方法

Docker CE是开发人员和小型团队最理想的选择,安装过程相对简单。下文将详细介绍通过Apt源安装Docker CE的步骤。

###403.卸载旧版本

在开始新安装之前,务必要先卸载可能存在的旧版本。以下命令可删除Docker及相关组件:

sudo apt-get remove docker docker-engine docker-ce docker.io

###404.更新Apt索引

确保系统索引更新为最新状态:

sudo apt-get update

###405.安装必要依赖

Docker官方仓库支持HTTPS访问,因此我们需要先安装以下依赖包:

sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common

###406.添加Docker官方GPG公钥

添加Docker官方GPG公钥以验证存储库:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

###407.添加Docker官方存储库

此处将添加Docker CE的官方存储库。请根据你的Ubuntu版本选择相应的命令:

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

###408.更新存储库索引

在添加存储库后,更新apt索引以获取最新信息:

sudo apt-get update

###409.安装Docker CE

最后一步即安装Docker CE:

sudo apt-get install -y docker-ce

###410.验证安装

确认Docker是否安装成功,可以通过以下命令查看服务状态:

systemctl status docker

如果服务未启动,可使用以下命令启动:

sudo systemctl start docker

###411.运行经典Hello World

验证Docker运行正常,可运行经典Hello World演示:

sudo docker run hello-world

完成以上步骤后,你已成功安装并验证了Docker CE!

转载地址:http://ozbrz.baihongyu.com/

你可能感兴趣的文章
Python/Selenium - 无法单击 www.instagram.com 上的“接受 cookie“按钮
查看>>
Python内置函数(35)——next
查看>>
python写入mysql
查看>>
python写入csv老是乱码或者各种不好
查看>>
Python内置函数
查看>>
Python2 安装MySQLdb库
查看>>
Python2 已终结,入手Python 3,你需要这30个技巧
查看>>
python写下拉列表在excel,无法使用python获取Excel下拉列表(组合框)值
查看>>
python2.7安装
查看>>
Python2.7安装ncmbot时提示:Microsoft Visual C++9.0 is required
查看>>
PYTHON2.Git.1
查看>>
python20181211
查看>>
Python内存管理机制
查看>>
Python2中range 和xrange的区别??
查看>>
python2和3的区别
查看>>
python2和python3的pip版本升级
查看>>
python2和python3的区别
查看>>
python2备份交换机配置脚本
查看>>
Python3 - 在字符串格式化程序参数中使用变量
查看>>
Python3 A*寻路算法实现
查看>>