fix: switch runtime stage to ubuntu to match builder glibc

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.
This commit is contained in:
pmb
2026-05-16 21:23:57 -07:00
parent 676d1700e1
commit 0d5414e03d
+12 -7
View File
@@ -29,14 +29,19 @@ RUN meson compile -C builddir
# Run tests to ensure quality # Run tests to ensure quality
RUN meson test -C builddir RUN meson test -C builddir
# Runtime stage - minimal Alpine Linux # Runtime stage match builder's glibc (Alpine/musl is incompatible
FROM alpine:latest # with our dynamically linked binary, esp. fortify _chk symbols).
FROM ubuntu:24.04
# Install runtime dependencies (if any) ENV DEBIAN_FRONTEND=noninteractive
RUN apk add --no-cache \
libstdc++ \ RUN apt-get update && apt-get install -y --no-install-recommends \
&& addgroup -g 1000 finger \ libstdc++6 \
&& adduser -D -s /bin/sh -u 1000 -G finger finger 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 the compiled binary from builder stage
COPY --from=builder /app/builddir/finger /usr/local/bin/finger COPY --from=builder /app/builddir/finger /usr/local/bin/finger