Csuper Blog

Csuper Blog

debian10安装docker
2021-03-28

1、安装通过HTTPS添加新存储库所需的软件包:

sudo apt update

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

2、使用以下curl命令导入存储库的GPG密钥:

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

成功后,该命令将返回OK。

3、将稳定的Docker APT存储库添加到系统的软件存储库列表中:

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

$(lsb_release -cs)将返回Debian发行版的名称 。

04、更新apt软件包列表并安装最新版本的Docker CE(Community Edition):

sudo apt update
sudo apt install docker-ce

05、安装完成后,Docker服务将自动启动。要验证它输入:

sudo systemctl status docker


6、Debian 10上安装 Docker Compose

sudo apt -y install  docker-compose