美文网首页
Ubuntu20.04中安装Docker

Ubuntu20.04中安装Docker

作者: LabVIEW_Python | 来源:发表于2022-02-22 10:00 被阅读0次

什么是Docker

  • Docker 是一个用于开发、发布和运行应用程序的开放平台
  • Docker 将应用程序与基础架构分离,便于快速交付软件
  • 使用 Docker,您可以像管理应用程序一样管理基础设施
  • 通过利用 Docker 快速交付、测试和部署代码,可以显着减少编写代码和在生产中运行之间的延迟。
在Ubuntu20.04中安装Docker

具体步骤如下
第一步:更新软件包索引,并且安装必要的依赖软件

sudo apt update
sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common

安装必要的依赖软件

第二步:导入源仓库的 GPG key

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

导入源仓库的 GPG key

第三步:将 Docker APT 软件源添加到系统

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

将 Docker APT 软件源添加到系统

第四步:安装Docker

sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io

安装Docker

第五步:测试Docker是否安装成功

sudo systemctl status docker

Docker安装成功

第六步:Docker的hello,world.

sudo docker container run hello-world

运行hello-world

完毕!
参考链接:https://docs.docker.com/engine/install/ubuntu/

相关文章

网友评论

      本文标题:Ubuntu20.04中安装Docker

      本文链接:https://www.haomeiwen.com/subject/rwzwlrtx.html