Created
November 8, 2021 12:18
-
-
Save ahndmal/eafb25cf17d2083645362034a0f6147c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Create a custom JLink runtime | |
# | |
FROM adoptopenjdk:16 AS builder | |
RUN cd /usr/local && \ | |
curl -O https://archive.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz && \ | |
tar xfvz apache-maven-3.6.3-bin.tar.gz && \ | |
rm apache-maven-3.6.3-bin.tar.gz | |
COPY . /root | |
RUN export PATH=$PATH:/usr/local/apache-maven-3.6.3/bin && \ | |
cd /root && \ | |
mvn --no-transfer-progress clean install | |
# | |
# Create a slim Debian image with the custom JLink runtime | |
# | |
FROM debian:10-slim | |
COPY --from=builder /root/target/jlink /usr/local/helloworld | |
EXPOSE 8080 | |
CMD ["/usr/local/helloworld/bin/helloworld"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment