安装docker

安装依赖

打开安装好的docker安装依赖

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

添加docker的GPG公钥

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

添加软件仓库

sudo add-apt-repository \
   "deb [arch=amd64] https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian \
   $(lsb_release -cs) \
   stable"

最后安装

apt-get update
sudo apt-get install docker-ce

如果提示docker-ce没有
那就先执行

apt-get install docker

再继续安装

安装成功后启动

docker run hello-world
# 添加到用户组
sudo adduser $USER docker

ubuntu 安装docker更简单

curl -fsSL https://get.docker.com -o get-docker.sh

相关文章:

  • 2022-02-02
  • 2021-10-24
  • 2022-12-23
  • 2021-08-02
  • 2021-07-20
  • 2022-01-08
  • 2021-12-28
  • 2022-01-11
猜你喜欢
  • 2022-02-18
  • 2022-12-23
  • 2022-12-23
  • 2021-12-03
  • 2022-12-23
  • 2022-12-23
  • 2021-12-14
相关资源
相似解决方案