From 0d5414e03d108b8c3f4e16a45b500e72e9408eff Mon Sep 17 00:00:00 2001 From: waffle2k Date: Sat, 16 May 2026 21:23:57 -0700 Subject: [PATCH] fix: switch runtime stage to ubuntu to match builder glibc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Alpine/musl runtime can't exec our glibc-linked binary — 'exec /usr/local/bin/finger: no such file or directory'. The recent syslog change pulls in fortify-source _chk symbols and fcntl64 that musl doesn't provide even with gcompat. Matching the runtime base to the builder (ubuntu:24.04) makes the image reliably runnable; ship netcat-openbsd for the healthcheck. --- Dockerfile | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 37cc8a5..0a8f34c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,14 +29,19 @@ RUN meson compile -C builddir # Run tests to ensure quality RUN meson test -C builddir -# Runtime stage - minimal Alpine Linux -FROM alpine:latest +# Runtime stage — match builder's glibc (Alpine/musl is incompatible +# with our dynamically linked binary, esp. fortify _chk symbols). +FROM ubuntu:24.04 -# Install runtime dependencies (if any) -RUN apk add --no-cache \ - libstdc++ \ - && addgroup -g 1000 finger \ - && adduser -D -s /bin/sh -u 1000 -G finger finger +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && apt-get install -y --no-install-recommends \ + libstdc++6 \ + netcat-openbsd \ + && rm -rf /var/lib/apt/lists/* \ + && (userdel -r ubuntu 2>/dev/null || true) \ + && groupadd -g 1000 finger \ + && useradd -m -u 1000 -g finger -s /bin/sh finger # Copy the compiled binary from builder stage COPY --from=builder /app/builddir/finger /usr/local/bin/finger