Ubuntu22.04云服务器安装docker

Ubuntu22.04云服务器安装docker

2024-10-09百度智能云服务器测试OK

步骤

直接安装出现 package docker ce has no installation candidate 诸如此类错误


curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/docker-archive-keyring.gpg

add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

apt update -y

apt install docker-ce docker-ce-cli containerd.io

docker -v

如果curl或者gpg不能用需要先安装

apt install apt-transport-https ca-certificates curl gnupg
posted @ 2024-10-09 15:11  迷路的哨兵甲  阅读(16)  评论(0编辑  收藏  举报