0
点赞
收藏
分享

微信扫一扫

Linux 版本Docker安装建议指导

史值拥 2022-05-01 阅读 42

背景:

与Docker Windows相比,安装Docker Linux既简单又快速。不需要太多时间。下面是Ubuntu中docker的简要安装指南。Ubuntu安装与其他Linux系统类似。

系统:

Ubuntu20.04, 支持虚拟环境

Docker 安装步骤(一步一步执行即可):

a) 安装必要的系统更新与证书:

sudo apt-get update

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

b) 安装 GPG 证书

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

c) 编写软件源网站信息,这是针对中国的源,也可以切换其他地址源:

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

Note: aliyu is a Chinese Ubuntu mirror source website.

d) 安装 Docker-CE

sudo apt-get -y update

sudo apt-get -y install docker-ce

Docker 测试:

docker run hello-world

Docker 环境并无Hello world, 会自动联网更新,随后会成功显示 Hello world ,表明安装成功。

举报

相关推荐

0 条评论