Update duokai.sh
This commit is contained in:
parent
b45d971905
commit
bc8ece36db
13
duokai.sh
13
duokai.sh
@ -17,19 +17,6 @@ then
|
|||||||
echo "未检测到 Docker,正在安装..."
|
echo "未检测到 Docker,正在安装..."
|
||||||
sudo apt-get install ca-certificates curl gnupg lsb-release
|
sudo apt-get install ca-certificates curl gnupg lsb-release
|
||||||
|
|
||||||
# 添加 Docker 官方 GPG 密钥
|
|
||||||
sudo mkdir -p /etc/apt/keyrings
|
|
||||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
|
||||||
|
|
||||||
# 设置 Docker 仓库
|
|
||||||
echo \
|
|
||||||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
|
|
||||||
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
|
||||||
|
|
||||||
# 授权 Docker 文件
|
|
||||||
sudo chmod a+r /etc/apt/keyrings/docker.gpg
|
|
||||||
sudo apt-get update
|
|
||||||
|
|
||||||
# 安装 Docker 最新版本
|
# 安装 Docker 最新版本
|
||||||
sudo apt-get install docker.io -y
|
sudo apt-get install docker.io -y
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user