-
Notifications
You must be signed in to change notification settings - Fork 0
Add docker jre images for java 11 and 14 #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
6833ceb
Add docker jre images for java 8, 11 and 14
ravisingal 324af66
pin base java image verion
ravisingal 3c77d38
update image tags
ravisingal 68e6600
use ARG for java version
ravisingal 02a2352
enable publishing docker image
ravisingal eb060aa
remove java 8 image
ravisingal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,57 @@ | ||
| FROM gcr.io/distroless/java:11-debug | ||
| ARG JAVA_VERSION | ||
| FROM azul/zulu-openjdk-debian:${JAVA_VERSION} AS jre | ||
|
|
||
| # Needed for --strip-debug | ||
| RUN apt-get -y update && apt-get -y install binutils | ||
|
|
||
| # Included modules cherrypicked from https://docs.oracle.com/en/java/javase/11/docs/api/ | ||
| # | ||
| # jdk.unsupported is undocumented but contains Unsafe, which is used by several dependencies to | ||
| # improve performance. | ||
| RUN cd / && jlink --no-header-files --no-man-pages --compress=0 --strip-debug \ | ||
| --add-modules java.base,java.logging,\ | ||
| # java.desktop includes java.beans which is used by Spring | ||
| java.desktop,\ | ||
| java.sql,\ | ||
| # instrumentation | ||
| java.instrument,\ | ||
| # we don't use JMX, but log4j2 errors without it: LOG4J2-716 | ||
| java.management,\ | ||
| # remote debug | ||
| jdk.jdwp.agent,\ | ||
| # JVM metrics such as garbage collection | ||
| jdk.management,\ | ||
| # prevents us from needing a different base layer for kafka-zookeeper | ||
| # ZooKeeper needs jdk.management.agent, and adding it is 900K vs 200M for a different base layer | ||
| jdk.management.agent,\ | ||
| # non-netty based DNS | ||
| java.naming,jdk.naming.dns,\ | ||
| # TLS handehake with servers that use elliptic curve certificates | ||
| jdk.crypto.ec,\ | ||
| # sun.misc.Unsafe and friends | ||
| jdk.unsupported\ | ||
| --output jre | ||
|
|
||
| # We extract JRE's hard dependencies, libz and SSL certs, from the fat JRE image. | ||
| FROM gcr.io/distroless/java:11-debug AS deps | ||
|
|
||
| FROM gcr.io/distroless/cc:debug | ||
|
|
||
| MAINTAINER Hypertrace "https://www.hypertrace.org/" | ||
|
|
||
| SHELL ["/busybox/sh", "-c"] | ||
|
|
||
| RUN ln -s /busybox/sh /bin/sh | ||
|
|
||
| COPY --from=deps /etc/ssl/certs/java /etc/ssl/certs/java | ||
|
|
||
| COPY --from=deps /lib/x86_64-linux-gnu/libz.so.1.2.8 /lib/x86_64-linux-gnu/libz.so.1.2.8 | ||
| RUN ln -s /lib/x86_64-linux-gnu/libz.so.1.2.8 /lib/x86_64-linux-gnu/libz.so.1 | ||
|
|
||
| COPY --from=jre /jre /usr/lib/jvm/zulu-11-amd64-slim | ||
| RUN ln -s /usr/lib/jvm/zulu-11-amd64-slim/bin/java /usr/bin/java | ||
|
|
||
| # set JAVA_HOME | ||
| ENV JAVA_HOME=/usr/lib/jvm/zulu-11-amd64-slim | ||
|
|
||
| ENTRYPOINT ["/usr/bin/java", "-jar"] | ||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| ARG JAVA_VERSION | ||
| FROM azul/zulu-openjdk-debian:${JAVA_VERSION} AS jre | ||
|
|
||
| # Needed for --strip-debug | ||
| RUN apt-get -y update && apt-get -y install binutils | ||
|
|
||
| # Included modules cherrypicked from https://docs.oracle.com/en/java/javase/11/docs/api/ | ||
| # | ||
| # jdk.unsupported is undocumented but contains Unsafe, which is used by several dependencies to | ||
| # improve performance. | ||
| RUN cd / && jlink --no-header-files --no-man-pages --compress=0 --strip-debug \ | ||
| --add-modules java.base,java.logging,\ | ||
| # java.desktop includes java.beans which is used by Spring | ||
| java.desktop,\ | ||
| java.sql,\ | ||
| # instrumentation | ||
| java.instrument,\ | ||
| # we don't use JMX, but log4j2 errors without it: LOG4J2-716 | ||
| java.management,\ | ||
| # remote debug | ||
| jdk.jdwp.agent,\ | ||
| # JVM metrics such as garbage collection | ||
| jdk.management,\ | ||
| # prevents us from needing a different base layer for kafka-zookeeper | ||
| # ZooKeeper needs jdk.management.agent, and adding it is 900K vs 200M for a different base layer | ||
| jdk.management.agent,\ | ||
| # non-netty based DNS | ||
| java.naming,jdk.naming.dns,\ | ||
| # TLS handehake with servers that use elliptic curve certificates | ||
| jdk.crypto.ec,\ | ||
| # sun.misc.Unsafe and friends | ||
| jdk.unsupported\ | ||
| --output jre | ||
|
|
||
| # We extract JRE's hard dependencies, libz and SSL certs, from the fat JRE image. | ||
| FROM gcr.io/distroless/java:11-debug AS deps | ||
|
|
||
| FROM gcr.io/distroless/cc:debug | ||
|
|
||
| MAINTAINER Hypertrace "https://www.hypertrace.org/" | ||
|
|
||
| SHELL ["/busybox/sh", "-c"] | ||
|
|
||
| RUN ln -s /busybox/sh /bin/sh | ||
|
|
||
| COPY --from=deps /etc/ssl/certs/java /etc/ssl/certs/java | ||
|
|
||
| COPY --from=deps /lib/x86_64-linux-gnu/libz.so.1.2.8 /lib/x86_64-linux-gnu/libz.so.1.2.8 | ||
| RUN ln -s /lib/x86_64-linux-gnu/libz.so.1.2.8 /lib/x86_64-linux-gnu/libz.so.1 | ||
|
|
||
| COPY --from=jre /jre /usr/lib/jvm/zulu-14-amd64-slim | ||
| RUN ln -s /usr/lib/jvm/zulu-14-amd64-slim/bin/java /usr/bin/java | ||
|
|
||
| # set JAVA_HOME | ||
| ENV JAVA_HOME=/usr/lib/jvm/zulu-14-amd64-slim | ||
|
|
||
| ENTRYPOINT ["/usr/bin/java", "-jar"] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| plugins { | ||
| id("org.hypertrace.docker-publish-plugin") | ||
| } | ||
|
|
||
| var javaVersion = "14.0.2-14.29.23" | ||
|
|
||
| hypertraceDocker { | ||
| defaultImage { | ||
| imageName.set("java") | ||
| buildArgs.put("JAVA_VERSION", javaVersion) | ||
| tags.forEach { it.onlyIf { false } } | ||
| tag(javaVersion) | ||
| tag(javaVersion.split('-')[0]) | ||
| tag(javaVersion.split('.')[0]) | ||
| } | ||
| } |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ravisingal we don't use spring right? do we need these?