From 36cf33366bbe0dd602185a87a241ff070517f868 Mon Sep 17 00:00:00 2001 From: Klaus Goger Date: Thu, 2 Nov 2023 12:31:54 +0100 Subject: [PATCH] docker: update to Debian 12 (Bookworm) Update parent image to bookworm. This allows us to remove all the backports and also to build Ubuntu images again as it requires dpkg zstd support. Signed-off-by: Klaus Goger --- docker/Dockerfile | 42 ++++++------------------------------------ 1 file changed, 6 insertions(+), 36 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 972236b7..8231a6f8 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -3,7 +3,7 @@ ARG DEBIAN_FRONTEND=noninteractive ARG GOPATH=/usr/local/go ### first stage - builder ### -FROM debian:bullseye-slim as builder +FROM debian:bookworm-slim as builder ARG DEBIAN_FRONTEND ARG GOPATH @@ -26,24 +26,8 @@ COPY . $GOPATH/src/github.com/go-debos/debos WORKDIR $GOPATH/src/github.com/go-debos/debos/cmd/debos RUN go install ./... -# Pull the latest archlinux-keyring, since the one in Debian is outdated -# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1026080 -RUN apt-get update && \ - apt-get install -y --no-install-recommends \ - pkgconf \ - python3-all \ - sq \ - systemd && \ - rm -rf /var/lib/apt/lists/* - -RUN git clone https://gitlab.archlinux.org/archlinux/archlinux-keyring && \ - cd archlinux-keyring && \ - git checkout -B latest-release 20221213 && \ - make build && \ - make PREFIX=/usr KEYRING_TARGET_DIR=/usr/share/keyrings/ DESTDIR=/arch-keyring install - ### second stage - runner ### -FROM debian:bullseye-slim as runner +FROM debian:bookworm-slim as runner ARG DEBIAN_FRONTEND ARG GOPATH @@ -96,26 +80,16 @@ RUN apt-get update && \ rsync \ systemd \ systemd-container \ + systemd-resolved \ u-boot-tools \ unzip \ user-mode-linux \ xfsprogs \ xz-utils \ - zip && \ - rm -rf /var/lib/apt/lists/* - -# Enable backports for the Arch dependencies -RUN echo "deb http://ftp.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list - -# NOTE: Explicitly install arch-install-scripts from backports. The normal one -# lacks pactrap. -# Install Arch dependencies -RUN apt-get update && \ - apt-get install -y --no-install-recommends \ + zip \ makepkg \ - pacman-package-manager && \ - apt-get install -y --no-install-recommends \ - -t bullseye-backports \ + pacman-package-manager \ + archlinux-keyring \ arch-install-scripts && \ rm -rf /var/lib/apt/lists/* @@ -127,8 +101,4 @@ RUN for arch in aarch64 alpha arm armeb cris hexagon hppa m68k microblaze mips m COPY --from=builder $GOPATH/bin/debos /usr/local/bin/debos -# Pull the latest archlinux-keyring, since the one in Debian is outdated -# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1026080 -COPY --from=builder /arch-keyring/ / - ENTRYPOINT ["/usr/local/bin/debos"]