华为云虚拟服务器安装docker-ce
操作系统:Ubuntu 22.04.2 LTS
# 更新仓库缓存
$ sudo apt-get update
# 安装必要的包
$ sudo apt-get install ca-certificates curl
# Add GPG key
# apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
$ sudo curl -fsSL https://repo.huaweicloud.com/docker-ce/linux/ubuntu/gpg -o /etc/apt/trusted.gpg.d/docker.gpg
# 添加 华为仓库
$ sudo add-apt-repository "deb [arch=amd64] https://repo.huaweicloud.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
# 安装 docker
$ sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
# 验证是否安装成功
$ docker -v