4
4
ARG DSE_VERSION=6.9.7
5
5
ARG DS_BASE_DEBIAN=ds-base-ubuntu-openjdk-11
6
6
ARG BASETAG=11.0.22-jdk-ubuntu-20240427
7
+ FROM --platform=$BUILDPLATFORM maven:3.8.6-openjdk-11-slim AS netty-setup
8
+ COPY settings.xml /root/.m2/settings.xml
9
+ RUN set -x \
10
+ && mvn dependency:get -Dartifact=io.netty:netty-all:4.1.100.2.dse \
11
+ && mvn dependency:get -Dtransitive=false -Dartifact=io.netty:netty-transport-native-epoll:4.1.100.2.dse \
12
+ && mvn dependency:get -Dtransitive=false -Dartifact=io.netty:netty-transport-native-epoll:4.1.100.2.dse:jar:linux-x86_64 \
13
+ && mvn dependency:get -Dtransitive=false -Dartifact=io.netty:netty-transport-native-epoll:4.1.100.2.dse:jar:linux-aarch_64 \
14
+ && mvn dependency:get -Dtransitive=false -Dartifact=io.netty:netty-transport-native-kqueue:4.1.100.2.dse \
15
+ ## The artifacts below don't seem to be present yet, we'll need them for ARM images to work on OSX
16
+ # && mvn dependency:get -Dtransitive=false -Dartifact=io.netty:netty-transport-native-kqueue:4.1.100.2.dse:jar:osx-x86_64 \
17
+ # && mvn dependency:get -Dtransitive=false -Dartifact=io.netty:netty-transport-native-kqueue:4.1.100.2.dse:jar:osx-aarch_64 \
18
+ && mkdir /netty \
19
+ && find ~/.m2/repository/io/netty -type f -name "netty*4.1.100.2.dse*.jar" -exec cp {} /netty/ \;
20
+
7
21
FROM datastax/${DS_BASE_DEBIAN}:${BASETAG} AS dse-server-prep
8
22
9
23
# Set up configuration variables
@@ -26,6 +40,8 @@ RUN set -x \
26
40
&& mkdir -p "$DSE_HOME" \
27
41
&& tar -C "$DSE_HOME" --strip-components=1 -xzf /${TARBALL} \
28
42
&& rm /${TARBALL} \
43
+ # Replace Netty with ARM compatible version
44
+ && find ${DSE_HOME}/resources/cassandra/lib/ -type f -name "netty*" -exec rm {} \; \
29
45
# Unpack Agent tarball
30
46
&& mkdir -p "$DSE_AGENT_HOME" \
31
47
&& tar -C "$DSE_AGENT_HOME" --strip-components=1 -xzf /${DSE_AGENT_TARBALL} \
@@ -35,6 +51,7 @@ RUN set -x \
35
51
&& apt-get install -y --install-recommends rdfind \
36
52
&& rdfind -makehardlinks true -makeresultsfile false ${DSE_HOME} \
37
53
&& chmod -R g+w ${DSE_HOME} ${DSE_AGENT_HOME}
54
+ COPY --chown=dse:root --from=netty-setup /netty ${DSE_HOME}/resources/cassandra/lib/
38
55
39
56
#############################################################
40
57
0 commit comments