Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save richmidwinter/d8bedfe49f0845148f0a41482b4bd53d to your computer and use it in GitHub Desktop.
Save richmidwinter/d8bedfe49f0845148f0a41482b4bd53d to your computer and use it in GitHub Desktop.
FROM azul/zulu-openjdk-alpine:11 AS builder
WORKDIR /
RUN jlink --no-header-files --no-man-pages --compress=2 --strip-debug --add-modules java.base,java.compiler,java.desktop,java.instrument,java.logging,java.management,java.naming,java.scripting,java.security.jgss,java.sql,java.xml,jdk.attach,jdk.jdi,jdk.management,jdk.unsupported,jdk.crypto.ec --output /build/jre
FROM alpine:3
COPY --from=builder /build/jre /usr/local/java
RUN ln -sf /usr/local/java/bin/java /usr/bin/java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment