百度云服务ubtuntu安装docker

1. 更新你的包管理器和安装必要的包

sudo apt-get update

sudo apt-get install -y \
ca-certificates \
curl \
gnupg \
lsb-release

2. 添加Docker的官方GPG密钥

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

4. 安装Docker Engine

现在,你可以安装Docker Engine了:

echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

\>

百度云服务器:

apt install docker.io

 

5\ 设置Docker 启动

sudo systemctl start docker
sudo systemctl enable docker

 

posted @ 2025-09-23 10:09  成年人35以上痛的开发  阅读(8)  评论(0)    收藏  举报