You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docker/pulsar/Dockerfile
+14
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,9 @@ RUN for SUBDIRECTORY in conf data download logs instances/deps packages-storage;
48
48
RUN chmod -R g+rx /pulsar/bin
49
49
RUN chmod -R o+rx /pulsar
50
50
51
+
# Enable snappy-java to use system lib
52
+
RUN echo 'OPTS="$OPTS -Dorg.xerial.snappy.use.systemlib=true"' >> /pulsar/conf/bkenv.sh
53
+
51
54
### Create one stage to include JVM distribution
52
55
FROM alpine AS jvm
53
56
@@ -61,7 +64,16 @@ RUN /usr/lib/jvm/default-jvm/bin/jlink --add-modules ALL-MODULE-PATH --compress
61
64
RUN echo networkaddress.cache.ttl=1 >> /opt/jvm/conf/security/java.security
62
65
RUN echo networkaddress.cache.negative.ttl=1 >> /opt/jvm/conf/security/java.security
63
66
67
+
## Create one stage to include snappy-java native lib
68
+
# Fix the issue when using snappy-java in x86 arch alpine
69
+
# See https://github.com/xerial/snappy-java/issues/181 https://github.com/xerial/snappy-java/issues/579
70
+
# We need to ensure that the version of the native library matches the version of snappy-java imported via Maven
71
+
FROM alpine AS snappy-java
64
72
73
+
ARG SNAPPY_VERSION
74
+
RUN apk add git alpine-sdk util-linux cmake autoconf automake libtool openjdk17 maven curl bash tar
75
+
ENV JAVA_HOME=/usr
76
+
RUN curl -Ls https://github.com/xerial/snappy-java/archive/refs/tags/v$SNAPPY_VERSION.tar.gz | tar zxf - && cd snappy-java-$SNAPPY_VERSION && make clean-native native
65
77
FROM apachepulsar/glibc-base:2.38 as glibc
66
78
67
79
## Create final stage from Alpine image
@@ -115,6 +127,8 @@ RUN apk add --allow-untrusted --force-overwrite /root/packages/glibc-*.apk
0 commit comments