Note/环境/安装教程/Ubuntu安装Docker.md
2024-01-12 16:35:29 +08:00

36 lines
747 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

先更新源,并且安装必要的依赖软件
```shell
sudo apt update
sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
```
导入源仓库的 GPG key
```shell
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
```
添加 Docker APT 软件源
```shell
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
```
安装 Docker 最新版本
```shell
sudo apt install docker-ce docker-ce-cli containerd.io
```
至此安装完成。
输入命令验证是否安装成功查看是否显示Docker版本号。
```shell
docker version
```
```shell
sudo apt-get update
sudo apt install docker-compose-plugin
```