diff --git a/.github/workflows/test_readme.yml b/.github/workflows/test_readme.yml
index a657fd7223..e73d5ddcb2 100644
--- a/.github/workflows/test_readme.yml
+++ b/.github/workflows/test_readme.yml
@@ -105,13 +105,17 @@ jobs:
- name: docker/README.md - openzipkin/zipkin
run: |
build-bin/docker/docker_build openzipkin/zipkin:test &&
- build-bin/docker/docker_test_image openzipkin/zipkin:test
+ build-bin/docker/docker_test_image openzipkin/zipkin:test &&
+ docker run --rm --entrypoint=/bin/sh openzipkin/zipkin:test \
+ -c 'cd BOOT-INF/lib && du -sk *aarch* *x86* *a64*' || true
env:
RELEASE_FROM_MAVEN_BUILD: true
- name: docker/README.md - openzipkin/zipkin-slim
run: |
build-bin/docker/docker_build openzipkin/zipkin-slim:test &&
- build-bin/docker/docker_test_image openzipkin/zipkin-slim:test
+ build-bin/docker/docker_test_image openzipkin/zipkin-slim:test &&
+ docker run --rm --entrypoint=/bin/sh openzipkin/zipkin-slim:test \
+ -c 'cd BOOT-INF/lib && du -sk *aarch* *x86* *a64*' || true
env:
DOCKER_TARGET: zipkin-slim
RELEASE_FROM_MAVEN_BUILD: true
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 1154231739..9a1c98cf6b 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -46,10 +46,18 @@ ENV RELEASE_FROM_MAVEN_BUILD=$release_from_maven_build
ARG version=master
ENV VERSION=$version
ENV MAVEN_PROJECT_BASEDIR=/code
-RUN /code/build-bin/maven/maven_build_or_unjar io.zipkin zipkin-server ${VERSION} exec && \
+ARG TARGETARCH
+RUN test "${TARGETARCH}" != "" && \
+ /code/build-bin/maven/maven_build_or_unjar io.zipkin zipkin-server ${VERSION} exec && \
mv zipkin-server zipkin && \
/code/build-bin/maven/maven_build_or_unjar io.zipkin zipkin-server ${VERSION} slim && \
- mv zipkin-server zipkin-slim
+ mv zipkin-server zipkin-slim && \
+ # Copy tcnative deps to slim: 1.1MB more libs when pared to current platform.
+ cp zipkin/BOOT-INF/lib/*tcnative*.jar zipkin-slim/BOOT-INF/lib/ && \
+ # Remove any unused platform-specific jars. This results in none for s390x or non-linux.
+ rm */BOOT-INF/lib/*windows* */BOOT-INF/lib/*osx* && \
+ if [ "${TARGETARCH}" != "amd64" ]; then rm */BOOT-INF/lib/*x86*; fi && \
+ if [ "${TARGETARCH}" != "arm64" ]; then rm */BOOT-INF/lib/*a64* */BOOT-INF/lib/*aarch*; fi
# Almost everything is common between the slim and normal build
FROM ghcr.io/openzipkin/java:${java_version}-jre as base-server
diff --git a/zipkin-server/pom.xml b/zipkin-server/pom.xml
index 8cd1537723..7751a552e2 100644
--- a/zipkin-server/pom.xml
+++ b/zipkin-server/pom.xml
@@ -626,7 +626,7 @@
slim
- com.google.auto.value,com.google.guava,io.dropwizard.metrics,com.datastax.oss,com.github.jnr,org.ow2.asm,org.jooq,javax.xml.bind,org.mariadb.jdbc,com.zaxxer,org.apache.activemq,org.apache.geronimo.specs,org.fusesource.hawtbuf,org.apache.kafka,com.github.luben,org.lz4,org.xerial.snappy,com.rabbitmq,jakarta.annotation,org.apache.thrift,org.apache.logging.log4j
+ com.google.auto.value,com.google.guava,io.dropwizard.metrics,org.apache.cassandra,com.github.jnr,org.ow2.asm,org.jooq,javax.xml.bind,org.mariadb.jdbc,com.zaxxer,org.apache.activemq,org.apache.geronimo.specs,org.fusesource.hawtbuf,org.apache.kafka,com.github.luben,org.lz4,org.xerial.snappy,com.rabbitmq,jakarta.annotation,org.apache.thrift,org.apache.logging.log4j
@@ -656,11 +656,14 @@
io.netty
- netty-tcnative-boringssl-static
+ netty-codec-haproxy
+
+
io.netty
- netty-codec-haproxy
+ netty-tcnative-boringssl-static