From 2f1ca8ab19e71171a38069ef4c554c9d9eb27db6 Mon Sep 17 00:00:00 2001 From: Marco Nenciarini Date: Thu, 29 Jan 2026 15:41:03 +0100 Subject: [PATCH] fix: use sysconfig for Python stdlib path and remove x86_64 comment Use sysconfig.get_path('stdlib') to dynamically determine the Python standard library path instead of hardcoding python3.13. Also remove architecture-specific comment since this is a multiarch image. Signed-off-by: Marco Nenciarini --- containers/Dockerfile.sidecar | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/containers/Dockerfile.sidecar b/containers/Dockerfile.sidecar index 0b8df35..193aa10 100644 --- a/containers/Dockerfile.sidecar +++ b/containers/Dockerfile.sidecar @@ -110,7 +110,6 @@ LABEL summary="$SUMMARY" \ COPY --from=pythonbuilder /venv /venv # Copy runtime libraries from extracted packages -# All libraries are in /usr/lib/x86_64-linux-gnu COPY --from=pythonbuilder /dependencies/usr/lib /usr/lib # Copy Go manager binary @@ -118,7 +117,7 @@ COPY --from=gobuilder /workspace/manager /manager # Compile all Python bytecode as root to avoid runtime compilation USER 0:0 -RUN ["/venv/bin/python3", "-m", "compileall", "-q", "/usr/lib/python3.13", "/venv"] +RUN ["/venv/bin/python3", "-c", "import sysconfig, compileall; compileall.compile_dir(sysconfig.get_path('stdlib'), quiet=1); compileall.compile_dir('/venv', quiet=1)"] USER 26:26 ENTRYPOINT ["/manager"]