Java OpenResty Spring Spring Boot MySQL Redis MongoDB PostgreSQL Linux Android Nginx 面试 小程序 Arthas JVM AQS juc Kubernetes Docker 诊断工具


Ubuntu 安装 Docker

Docker Ubuntu 评论 1 大约 1083 字

镜像源

https://mirror.tuna.tsinghua.edu.cn/help/docker-ce/

卸载

卸载原先安装过的docker

sudo apt-get remove docker docker-engine docker.io

安装依赖

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

异常信息

如果有报错,提示gnupg2没安装,可以更换镜像源为清华大学Ubuntu镜像源。

具体可参考:

Package gnupg2 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  gpgv gpgsm gnupg-l10n gnupg dirmngr

E: Package 'gnupg2' has no installation candidate

信任公钥

信任DockerGPG公钥。

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

添加仓库

amd64

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

树莓派或其它 ARM

echo "deb [arch=armhf] https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/ubuntu \
     $(lsb_release -cs) stable" | \
    sudo tee /etc/apt/sources.list.d/docker.list

安装 Docker

sudo apt-get update
sudo apt-get install docker-ce
阅读 1606 · 发布于 2022-01-15

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb

扫描下方二维码关注公众号和小程序↓↓↓

扫描二维码关注我
昵称:
  • fHLvlxbf 1楼
    e
    Chrome | Windows 10 2023-07-24
随便看看 换一批