2833e76914
CI / Build Native (push) Has been cancelled
The native binary is built against glibc 2.35 (Ubuntu jammy in CI) but quarkus-micro-image:2.0 ships glibc 2.34 (UBI 9), hence the 'GLIBC_2.35 not found' at runtime. Switching to ubuntu:22.04 as the runtime base matches glibc exactly and lets us stop fighting with musl / static binaries. Dockerfile: - FROM ubuntu:22.04 (was quarkus-micro-image:2.0) - install curl + ca-certificates via apt (apt + bash are present, so chmod/echo securerandom run in-line again) - single-stage: no more curl-builder multi-stage - useradd UID 1001 (matches the in-container USER) CI: - drop binary-type=STATIC and --libc=musl (binary is dynamic again) - drop the rm -f target/*-runner (cache invalidate) - 'Stage binary for Docker' is now just 'cp' - verify step is informational only Image is ~5 MB larger than quarkus-micro-image but the runtime now matches the build glibc, so the container starts cleanly.
17 lines
484 B
Docker
17 lines
484 B
Docker
FROM ubuntu:22.04
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends curl ca-certificates \
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
&& useradd -u 1001 -U -M -s /usr/sbin/nologin app \
|
|
&& mkdir -p /work \
|
|
&& chown 1001:1001 /work
|
|
WORKDIR /work/
|
|
COPY --chown=1001:1001 build-output/*-runner /work/application
|
|
RUN chmod 775 /work /work/application \
|
|
&& echo "securerandom.source=file:/dev/urandom" >> /work/application
|
|
|
|
EXPOSE 8080
|
|
USER 1001
|
|
|
|
ENTRYPOINT ["./application"]
|