一个80后
程序员的笔记

Debian 11 安装 Docker

删除本机中的Docker

sudo apt remove -y docker docker-engine docker.io containerd runc

安装Docker

apt update
apt install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common sudo
curl -fsSL https://download.docker.com/linux/debian/gpg |sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
## 国内
curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/debian/gpg |sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list
## 国内
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list
apt update

安装 Docker

apt install -y docker-ce docker-ce-cli containerd.io
systemctl enable docker
systemctl status docker

非root用户运行docker

sudo groupadd docker
sudo useradd -m -s /bin/bash bbhsky
sudo usermod -aG docker bbhsky
赞(24) 打赏
未经允许不得转载:笨笨天地 » Debian 11 安装 Docker
分享到: 更多 (0)

相关推荐

  • 暂无文章

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏