Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/native-2.6.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
solsson committed Nov 12, 2020
2 parents 0a9bf8e + 4187935 commit e2ac792
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions native/zookeeper-server-start.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@ FROM solsson/kafka:nativebase as native
#ARG classpath=/opt/kafka/libs/slf4j-log4j12-1.7.30.jar:/opt/kafka/libs/log4j-1.2.17.jar:/opt/kafka/libs/slf4j-api-1.7.30.jar:/opt/kafka/libs/zookeeper-3.5.8.jar:/opt/kafka/libs/zookeeper-jute-3.5.8.jar
COPY --from=substitutions /workspace/target/*.jar /opt/kafka/libs/extensions/substitutions.jar
COPY --from=extralibs /*.jar /opt/kafka/libs/extensions/
ARG classpath=/opt/kafka/libs/extensions/substitutions.jar:/opt/kafka/libs/slf4j-api-1.7.30.jar:/opt/kafka/libs/extensions/slf4j-simple-1.7.30.jar:/opt/kafka/libs/extensions/log4j-over-slf4j-1.7.30.jar:/opt/kafka/libs/zookeeper-3.5.8.jar:/opt/kafka/libs/zookeeper-jute-3.5.8.jar:/opt/kafka/libs/netty-common-4.1.50.Final.jar:/opt/kafka/libs/netty-handler-4.1.50.Final.jar:/opt/kafka/libs/netty-buffer-4.1.50.Final.jar
# For running without JettyAdminServer we're probably fine with only substitutions + slf4j + zokeeper+zookeeper-jute; see https://github.com/solsson/dockerfiles/pull/31
ARG classpath=/opt/kafka/libs/extensions/substitutions.jar:/opt/kafka/libs/slf4j-api-1.7.30.jar:/opt/kafka/libs/extensions/slf4j-simple-1.7.30.jar:/opt/kafka/libs/extensions/log4j-over-slf4j-1.7.30.jar:/opt/kafka/libs/zookeeper-3.5.8.jar:/opt/kafka/libs/zookeeper-jute-3.5.8.jar:/opt/kafka/libs/jetty-server-9.4.24.v20191120.jar:/opt/kafka/libs/jetty-util-9.4.24.v20191120.jar:/opt/kafka/libs/jetty-io-9.4.24.v20191120.jar:/opt/kafka/libs/jetty-http-9.4.24.v20191120.jar:/opt/kafka/libs/jetty-servlet-9.4.24.v20191120.jar:/opt/kafka/libs/jetty-security-9.4.24.v20191120.jar:/opt/kafka/libs/netty-common-4.1.50.Final.jar:/opt/kafka/libs/netty-handler-4.1.50.Final.jar:/opt/kafka/libs/netty-buffer-4.1.50.Final.jar:/opt/kafka/libs/javax.servlet-api-3.1.0.jar:/opt/kafka/libs/jackson-core-2.10.2.jar:/opt/kafka/libs/jackson-databind-2.10.2.jar:/opt/kafka/libs/jackson-annotations-2.10.2.jar

COPY configs/zookeeper-server-start /home/nonroot/native-config

# Remaining issues:
# - java.lang.NoClassDefFoundError: Could not initialize class org.apache.zookeeper.server.admin.JettyAdminServer
# which is fine because https://github.com/apache/zookeeper/blob/release-3.5.7/zookeeper-server/src/main/java/org/apache/zookeeper/server/admin/AdminServerFactory.java
# documents that admin server is optional and it's only at startup

RUN native-image \
--no-server \
--install-exit-handlers \
-H:+ReportExceptionStackTraces \
--no-fallback \
-H:ConfigurationFileDirectories=/home/nonroot/native-config \
# Added because of org.apache.zookeeper.common.X509Util, org.apache.zookeeper.common.ZKConfig, javax.net.ssl.SSLContext ...
--initialize-at-build-time \
--initialize-at-run-time=org.apache.zookeeper.server.persistence.FileTxnLog \
--initialize-at-run-time=org.apache.zookeeper.server.persistence.TxnLogToolkit \
--initialize-at-run-time=org.apache.zookeeper.server.persistence.FilePadding \
# Added because of io.netty.buffer.Unpooled.wrappedBuffer(byte[]), org.eclipse.jetty.servlet.ServletContextHandler.<init>(int)
--allow-incomplete-classpath \
# -D options from entrypoint
-Djava.awt.headless=true \
Expand Down

0 comments on commit e2ac792

Please sign in to comment.