Skip to content

Instantly share code, notes, and snippets.

@maxday
Last active January 12, 2021 02:43
Show Gist options
  • Save maxday/6f7e4842a3e57384d49cf65fdddf9404 to your computer and use it in GitHub Desktop.
Save maxday/6f7e4842a3e57384d49cf65fdddf9404 to your computer and use it in GitHub Desktop.
Build a Distroless image for Quarkus
FROM registry.access.redhat.com/ubi8/ubi-minimal as nativebuilder
RUN mkdir -p /tmp/ssl \
&& cp /usr/lib64/libstdc++.so.6.0.25 /tmp/ssl/libstdc++.so.6 \
&& cp /usr/lib64/libgcc_s-8-20191121.so.1 /tmp/ssl/libgcc_s.so.1 \
&& cp /usr/lib64/libz.so.1 /tmp/ssl/libz.so.1
FROM gcr.io/distroless/base
COPY --from=nativebuilder /tmp/ssl/ /
ENV LD_LIBRARY_PATH /
COPY target/*-runner /application
EXPOSE 8080
CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment