博客
关于我
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中用于切换帧的函数
查看>>
python函数
查看>>
python----线程、进程、协程的区别及多线程详解
查看>>
python---5
查看>>
python---使用celery分布式系统异步发送短信(云通讯)来验证登录
查看>>
python--003--百分号字符串拼接、format
查看>>
Python--10、线程
查看>>
Python--Redis实战:第四章:数据安全与性能保障:第4节:复制
查看>>
python--基本代码规范
查看>>
Python--抽象类接口类
查看>>
PYTHON--欧拉习题二
查看>>
python--高级应用总结
查看>>
python-520表白代码,我看谁说程序员不懂浪漫,送你几套表白代码,一步到位
查看>>
Python-Asyncio TypeError:无法在‘;等待‘;表达式中使用对象DICT
查看>>
Python-AttributeError:‘;dict&39;对象没有属性‘;序列‘;
查看>>
Python-ldap:是否可以在不显式写入密码的情况下进行绑定?
查看>>
python出现 unknown encoding: idna 的处理方法
查看>>
Python出现 RuntimeError: dictionary changed size during iteration 的解决方法
查看>>
Python-numpy(2)数组的操作
查看>>
Python-Numpy的tile函数用法
查看>>