From 9732a14aa63e2739d99d43b0da471e4ce425197b Mon Sep 17 00:00:00 2001 From: John Alexander Date: Fri, 2 Oct 2026 14:23:53 -0700 Subject: [PATCH 1/2] Refine comments and enhance package manager checks Update traefik Dockerfile to detect the image type based on the available package manager. This avoids an issue we experienced due to using a mirrored registry instead of docker.io --- openc3-traefik/Dockerfile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/openc3-traefik/Dockerfile b/openc3-traefik/Dockerfile index 2bca18f58d..52ffff756b 100644 --- a/openc3-traefik/Dockerfile +++ b/openc3-traefik/Dockerfile @@ -28,19 +28,23 @@ ENV IMAGE_GROUP=openc3 ENV USER_ID=1001 ENV GROUP_ID=1001 -# On docker.io (alpine) create the non-root user and upgrade with apk. +# On the alpine image, create the non-root user and upgrade with apk. # The ironbank image already has uid 1001, but it is only rebuilt on RedHat's -# schedule, so pull the RPM security fixes released since with dnf. -RUN if [[ $OPENC3_DEPENDENCY_REGISTRY == 'docker.io' ]]; then \ +# schedule, so pull the RPM security fixes released since with dnf. Detect +# which package manager is present rather than inferring from the registry +# name, so mirrors of the public alpine image still take the apk branch. +RUN if command -v apk >/dev/null 2>&1; then \ addgroup -g ${GROUP_ID} -S ${IMAGE_GROUP}; \ adduser -u ${USER_ID} -G ${IMAGE_GROUP} -s /bin/ash -S ${IMAGE_USER}; \ apk update && apk upgrade; \ - else \ + elif command -v dnf >/dev/null 2>&1; then \ dnf -y upgrade && \ dnf clean all && \ rm -rf /var/cache/dnf; \ + else \ + echo "no supported package manager (apk/dnf) found" >&2; exit 1; \ fi # Switch to user USER ${USER_ID} -COPY --chown=1001:1001 --chmod=755 ./entrypoint.sh /entrypoint.sh \ No newline at end of file +COPY --chown=1001:1001 --chmod=755 ./entrypoint.sh /entrypoint.sh From 3abcbf0464c4ee2a6477e8706f2eebeede3f0675 Mon Sep 17 00:00:00 2001 From: John Alexander Date: Fri, 2 Oct 2026 14:25:06 -0700 Subject: [PATCH 2/2] Remove extra line