From 02489e8369f26e18bd05664cda63dbb68961a847 Mon Sep 17 00:00:00 2001 From: fanuware Date: Thu, 4 Dec 2025 08:21:36 +0000 Subject: [PATCH] Update containers to Debian Trixie --- dockerfiles/Dockerfile | 33 +++++++++++++----------------- dockerfiles/staging/dut/Dockerfile | 15 ++++++-------- 2 files changed, 20 insertions(+), 28 deletions(-) diff --git a/dockerfiles/Dockerfile b/dockerfiles/Dockerfile index 15fd5eb1f..b7d8d640d 100644 --- a/dockerfiles/Dockerfile +++ b/dockerfiles/Dockerfile @@ -1,5 +1,5 @@ -FROM debian:bookworm-slim AS labgrid-base -ARG VERSION +FROM debian:trixie-slim AS labgrid-base +ARG VERSION=0.0.0 LABEL maintainer="eha@deif.com" @@ -7,14 +7,13 @@ ENV DEBIAN_FRONTEND=noninteractive COPY ./ /opt/labgrid/ -RUN set -e ;\ - apt update -q=2 ;\ - apt install -q=2 --yes --no-install-recommends python3 python3-dev python3-pip python3-setuptools git build-essential ;\ - pip3 install --break-system-packages -U pip;\ - apt clean ;\ - rm -rf /var/lib/apt/lists/* ;\ - cd /opt/labgrid ;\ - SETUPTOOLS_SCM_PRETEND_VERSION="$VERSION" pip3 install --break-system-packages --no-cache-dir . +RUN apt update -q=2 && \ + apt install -q=2 --yes --no-install-recommends python3 python3-dev python3-pip python3-setuptools git build-essential && \ + rm -rf /var/lib/apt/lists/* && \ + pip3 config --site set global.break-system-packages true && \ + pip3 config --site set global.root-user-action ignore && \ + cd /opt/labgrid && \ + SETUPTOOLS_SCM_PRETEND_VERSION="$VERSION" pip3 install --no-cache-dir . # # Client @@ -22,11 +21,9 @@ RUN set -e ;\ FROM labgrid-base AS labgrid-client ARG VERSION -RUN set -e ;\ - pip3 install --break-system-packages yq ;\ - apt update -q=2 ;\ - apt install -q=2 --yes --no-install-recommends microcom openssh-client rsync jq qemu-system qemu-utils ;\ - apt clean ;\ +RUN pip3 install yq && \ + apt update -q=2 && \ + apt install -q=2 --yes --no-install-recommends microcom openssh-client rsync jq qemu-system qemu-utils && \ rm -rf /var/lib/apt/lists/* CMD ["/bin/bash"] @@ -53,10 +50,8 @@ ARG VERSION COPY dockerfiles/exporter/entrypoint.sh /entrypoint.sh -RUN set -e ;\ - apt update -q=2 ;\ - apt install -q=2 --yes --no-install-recommends ser2net ;\ - apt clean ;\ +RUN apt update -q=2 && \ + apt install -q=2 --yes --no-install-recommends ser2net && \ rm -rf /var/lib/apt/lists/* VOLUME /opt/conf diff --git a/dockerfiles/staging/dut/Dockerfile b/dockerfiles/staging/dut/Dockerfile index a25a5597a..1db5cc007 100644 --- a/dockerfiles/staging/dut/Dockerfile +++ b/dockerfiles/staging/dut/Dockerfile @@ -1,17 +1,14 @@ -FROM debian:bookworm-slim +FROM debian:trixie-slim LABEL org.opencontainers.image.authors="mail@krevsbech.dk" ENV DEBIAN_FRONTEND=noninteractive -RUN set -e ;\ - apt update -q=2 ;\ - apt install -q=2 --yes --no-install-recommends openssh-server;\ - apt clean ;\ - rm -rf /var/lib/apt/lists/* ;\ - mkdir /var/run/sshd ;\ - echo 'root:PASSWORD' | chpasswd ;\ - echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config ;\ +RUN apt update -q=2 && \ + apt install -q=2 --yes --no-install-recommends openssh-server && \ + rm -rf /var/lib/apt/lists/* && \ + echo 'root:PASSWORD' | chpasswd && \ + echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config && \ sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd # SSH login fix. Otherwise user is kicked off after login