怎么样在ubuntu中安装docker

怎么样在ubuntu中安装docker,第1张

怎么样在ubuntu中安装docker

怎么样在ubuntu中安装docker

在Ubuntu中安装docker的方法及步骤如下:

1、更新ubuntu的apt源索引

sudo apt-get update

2、安装包允许apt通过HTTPS使用仓库

推荐学习:docker教程

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

3、添加Docker官方GPG key

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

4、设置Docker稳定版仓库

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

5、添加仓库后,更新apt源索引

sudo apt-get update

6、安装最新版Docker CE(社区版)

sudo apt-get install docker-ce

7、检查Docker CE是否安装正确

sudo docker run hello-world

出现如下信息,表示安装成功

以上就是怎么样在ubuntu中安装docker的详细内容,

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/yw/708610.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-24
下一篇 2022-04-24

发表评论

登录后才能评论

评论列表(0条)

保存