Fix: Docker VM deprecated gpg (#1649)

This commit is contained in:
CanbiZ 2025-01-21 19:34:12 +01:00 committed by GitHub
parent c3acbf09ed
commit ed8edcbf2d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -403,17 +403,17 @@ done
msg_info "Installing Pre-Requisite libguestfs-tools onto Host"
apt-get -qq update && apt-get -qq install libguestfs-tools -y >/dev/null
msg_ok "Installed libguestfs-tools successful"
msg_ok "Installed libguestfs-tools successfully"
msg_info "Adding Docker and Docker Compose Plugin to Debian 12 Qcow2 Disk Image Image"
msg_info "Adding Docker and Docker Compose Plugin to Debian 12 Qcow2 Disk Image"
virt-customize -q -a "${FILE}" --install qemu-guest-agent,apt-transport-https,ca-certificates,curl,gnupg-agent,software-properties-common,lsb-release >/dev/null &&
virt-customize -q -a "${FILE}" --root-password password:docker >/dev/null &&
virt-customize -q -a "${FILE}" --run-command "curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -" >/dev/null &&
virt-customize -q -a "${FILE}" --run-command "add-apt-repository \"deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/debian $(lsb_release -cs) stable\"" >/dev/null &&
virt-customize -q -a "${FILE}" --run-command "mkdir -p /etc/apt/keyrings && curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg" >/dev/null &&
virt-customize -q -a "${FILE}" --run-command "echo 'deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable' > /etc/apt/sources.list.d/docker.list" >/dev/null &&
virt-customize -q -a "${FILE}" --run-command "apt-get update -y && apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin" >/dev/null &&
virt-customize -q -a "${FILE}" --run-command "systemctl start docker && systemctl enable docker" >/dev/null &&
virt-customize -q -a "${FILE}" --run-command "echo -n > /etc/machine-id" >/dev/null
msg_ok "Added Docker and Docker Compose Plugin to Debian 12 Qcow2 Disk Image successful"
msg_ok "Added Docker and Docker Compose Plugin to Debian 12 Qcow2 Disk Image successfully"
msg_info "Creating a Docker VM"
qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \