什么是Docker?
- Docker 是一个用于开发、发布和运行应用程序的开放平台
- Docker 将应用程序与基础架构分离,便于快速交付软件
- 使用 Docker,您可以像管理应用程序一样管理基础设施
- 通过利用 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 -

第三步:将 Docker APT 软件源添加到系统
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

第四步:安装Docker
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io

第五步:测试Docker是否安装成功
sudo systemctl status docker

第六步:Docker的hello,world.
sudo docker container run hello-world

网友评论