Update duokai.sh
This commit is contained in:
parent
b45d971905
commit
bc8ece36db
15
duokai.sh
15
duokai.sh
@ -16,20 +16,7 @@ then
|
||||
# 如果 Docker 未安装,则进行安装
|
||||
echo "未检测到 Docker,正在安装..."
|
||||
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 最新版本
|
||||
sudo apt-get install docker.io -y
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user