Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 8 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,6 @@ jobs:
executor: gradle_docker
steps:
- setup_build_environment
- gradle:
args: :tag -Prelease
- add_ssh_keys:
fingerprints:
- '9f:bb:a7:39:fa:3d:39:04:bd:c6:66:27:79:b1:49:86'
- run: git push origin $(./gradlew -q :printVersion)
- gradle:
args: dockerPushImages

Expand All @@ -67,11 +61,11 @@ workflows:
build-and-publish:
jobs:
- build
# - publish:
# context: hypertrace-publishing
# requires:
# - build
# filters:
# branches:
# only:
# - main
- publish:
context: hypertrace-publishing
requires:
- build
filters:
branches:
only:
- main
58 changes: 57 additions & 1 deletion java-11/Dockerfile
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
Copy link
Contributor

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?

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"]
10 changes: 8 additions & 2 deletions java-11/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@ plugins {
id("org.hypertrace.docker-publish-plugin")
}

var javaVersion = "11.0.8-11.41.23"

hypertraceDocker {
defaultImage {
imageName.set("java")
setTagNameTransform { tag -> "11-${tag.name}" }
buildArgs.put("JAVA_VERSION", javaVersion)
tags.forEach { it.onlyIf { false } }
tag(javaVersion)
tag(javaVersion.split('-')[0])
tag(javaVersion.split('.')[0])
}
}
}
57 changes: 57 additions & 0 deletions java-14/Dockerfile
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"]
16 changes: 16 additions & 0 deletions java-14/build.gradle.kts
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])
}
}
1 change: 0 additions & 1 deletion java-8/Dockerfile

This file was deleted.

10 changes: 0 additions & 10 deletions java-8/build.gradle.kts

This file was deleted.

11 changes: 0 additions & 11 deletions semantic-build-versioning.gradle

This file was deleted.

9 changes: 2 additions & 7 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,5 @@ pluginManagement {
}
}

plugins {
id("org.hypertrace.version-settings") version "0.1.5"
}


include(":java-8")
include(":java-11")
include(":java-11")
include(":java-14")