Skip to content

Commit 8039c7c

Browse files
committed
Try only adding aarch64 epoll binary instead of replace all netty
1 parent 7332499 commit 8039c7c

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

Dockerfile-oss

+11-7
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,18 @@ COPY management-api-shim-4.x ./management-api-shim-4.x
2020
RUN mvn -q -ff package -DskipTests
2121

2222
FROM --platform=$BUILDPLATFORM maven:3.6.3-jdk-8-slim as netty4150
23-
RUN mvn dependency:get -DgroupId=io.netty -DartifactId=netty-all -Dversion=4.1.50.Final -Dtransitive=false
23+
RUN mvn dependency:get -DgroupId=io.netty -DartifactId=netty-transport-native-epoll -Dversion=4.1.50.Final -Dclassifier=linux-aarch64
24+
# RUN mvn dependency:get -DgroupId=io.netty -DartifactId=netty-all -Dversion=4.1.50.Final -Dtransitive=false
2425

2526
FROM --platform=linux/amd64 cassandra:3.11 as oss311-amd64
2627

2728
FROM --platform=linux/arm64 cassandra:3.11 as oss311-arm64
28-
# Netty arm64 epoll support was not added until 4.1.50 (https://github.com/netty/netty/pull/9804)
29-
# Only replace this dependency for arm64 to avoid regressions
30-
RUN rm /opt/cassandra/lib/netty-all-*.jar
31-
COPY --from=netty4150 /root/.m2/repository/io/netty/netty-all/4.1.50.Final/netty-all-4.1.50.Final.jar /opt/cassandra/lib/netty-all-4.1.50.Final.jar
29+
# The management api agent uses epoll, but Netty did not include arm64 binaries
30+
# until version 4.1.50 (https://github.com/netty/netty/pull/9804)
31+
# Only add this dependency for arm64 to avoid regressions
32+
COPY --from=netty4150 /root/.m2/repository/io/netty/netty-transport-native-epoll/4.1.50.Final/netty-transport-native-epoll-4.1.50.Final-linux-aarch64.jar /opt/cassandra/lib/
33+
# RUN rm /opt/cassandra/lib/netty-all-*.jar
34+
# COPY --from=netty4150 /root/.m2/repository/io/netty/netty-all/4.1.50.Final/netty-all-4.1.50.Final.jar /opt/cassandra/lib/netty-all-4.1.50.Final.jar
3235

3336
FROM oss311-${TARGETARCH} as oss311
3437

@@ -72,8 +75,9 @@ FROM --platform=linux/amd64 cassandra:4.0 as oss40-amd64
7275
FROM --platform=linux/arm64 cassandra:4.0 as oss40-arm64
7376
# Netty arm64 epoll support was not added until 4.1.50 (https://github.com/netty/netty/pull/9804)
7477
# Only replace this dependency for arm64 to avoid regressions
75-
RUN rm /opt/cassandra/lib/netty-all-*.jar
76-
COPY --from=netty4150 /root/.m2/repository/io/netty/netty-all/4.1.50.Final/netty-all-4.1.50.Final.jar /opt/cassandra/lib/netty-all-4.1.50.Final.jar
78+
# RUN rm /opt/cassandra/lib/netty-all-*.jar
79+
COPY --from=netty4150 /root/.m2/repository/io/netty/netty-transport-native-epoll/4.1.50.Final/netty-transport-native-epoll-4.1.50.Final-linux-aarch64.jar /opt/cassandra/lib/
80+
# COPY --from=netty4150 /root/.m2/repository/io/netty/netty-all/4.1.50.Final/netty-all-4.1.50.Final.jar /opt/cassandra/lib/netty-all-4.1.50.Final.jar
7781

7882
FROM oss40-${TARGETARCH} as oss40
7983

0 commit comments

Comments
 (0)