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