更新
1 2 3 4 5
| # 必执行 sudo apt update sudo apt upgrade
sudo apt install ca-certificates curl gnupg
|
添加Docker官方GPG密钥
1 2 3
| sudo install -m 0755 -d /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg sudo chmod a+r /etc/apt/keyrings/docker.gpg
|
设置Docker存储库
1 2 3 4 5 6
| echo \ "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \ "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null # 设置好后,再次更新 sudo apt update
|
安装最新版本Docker
1
| sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
安装Docker可视化管理Portainer
1 2
| sudo docker pull portainer/portainer-ce:latest sudo docker run -d -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer-ce
|
访问:http:// 你的IP地址:9000,设置用户名,密码即可!