ac349c1b34
CI / Build Native (push) Failing after 15m1s
Removed the RUN chmod/chown/echo steps from the Dockerfile. The Quarkus micro image 2.0 ships without /bin/sh and /usr/bin/sh, so any RUN instruction fails. The chmod and securerandom.source append now happen in the CI 'Stage binary for Docker' step, and COPY --chown=1001:1001 takes ownership of the binary in the image. COPY --chown requires BuildKit, so: - Install docker-buildx in the CI - Switch docker build -> docker buildx build The final image stays minimal (no shell, no microdnf, no extra packages).
20 lines
666 B
Docker
20 lines
666 B
Docker
FROM registry.access.redhat.com/ubi9/ubi-minimal AS curl-builder
|
|
RUN microdnf install -y curl-minimal && microdnf clean all \
|
|
&& mkdir -p /out/etc/pki /out/etc \
|
|
&& install -D -m 0755 /usr/bin/curl /out/usr/bin/curl \
|
|
&& for lib in $(ldd /usr/bin/curl | awk '/=>/ {print $3}' | sort -u); do \
|
|
install -D -m 0755 "$lib" "/out$lib"; \
|
|
done \
|
|
&& cp -rP /etc/pki/ca-trust /out/etc/pki/ \
|
|
&& cp -rP /etc/ssl /out/etc/
|
|
|
|
FROM quay.io/quarkus/quarkus-micro-image:2.0
|
|
WORKDIR /work/
|
|
COPY --chown=1001:1001 build-output/shot-crafter-calculator-1.0.0-runner /work/application
|
|
COPY --from=curl-builder /out/ /
|
|
|
|
EXPOSE 8080
|
|
USER 1001
|
|
|
|
ENTRYPOINT ["./application"]
|