Skip to content

Commit 251e21f

Browse files
author
Devdutt Shenoi
authored
fix: kafka build on aarch64 (#1161)
1 parent 1e79577 commit 251e21f

4 files changed

+27
-7
lines changed

.github/workflows/build-push-edge-kafka.yaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,24 @@ jobs:
3737
with:
3838
images: parseable/parseable
3939

40-
- name: Build and push
40+
- name: Build and push x86_64
4141
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
4242
with:
4343
context: .
4444
file: ./Dockerfile.kafka
4545
push: true
4646
tags: parseable/parseable:edge-kafka
47-
platforms: linux/amd64,linux/arm64
47+
platforms: linux/amd64
48+
build-args: |
49+
LIB_DIR=x86_64-linux-gnu
50+
51+
- name: Build and push aarch64
52+
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
53+
with:
54+
context: .
55+
file: ./Dockerfile.kafka
56+
push: true
57+
tags: parseable/parseable:edge-kafka
58+
platforms: =linux/arm64
59+
build-args: |
60+
LIB_DIR=aarch64-linux-gnu

Dockerfile.kafka

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,17 @@ RUN cargo build --release --features kafka
4949
# final stage
5050
FROM gcr.io/distroless/cc-debian12:latest
5151

52+
# Copy only the libraries that binary needs since kafka is statically linked
53+
ARG LIB_DIR
54+
COPY --from=builder /usr/lib/${LIB_DIR}/libsasl2.so.2 /usr/lib/${LIB_DIR}/
55+
COPY --from=builder /usr/lib/${LIB_DIR}/libssl.so.3 /usr/lib/${LIB_DIR}/
56+
COPY --from=builder /usr/lib/${LIB_DIR}/libcrypto.so.3 /usr/lib/${LIB_DIR}/
57+
5258
WORKDIR /parseable
5359

5460
# Copy the Parseable binary from builder
5561
COPY --from=builder /parseable/target/release/parseable /usr/bin/parseable
5662

57-
# Copy only the libraries that binary needs since kafka is statically linked
58-
COPY --from=builder /usr/lib/x86_64-linux-gnu/libsasl2.so.2 /usr/lib/x86_64-linux-gnu/
59-
COPY --from=builder /usr/lib/x86_64-linux-gnu/libssl.so.3 /usr/lib/x86_64-linux-gnu/
60-
COPY --from=builder /usr/lib/x86_64-linux-gnu/libcrypto.so.3 /usr/lib/x86_64-linux-gnu/
61-
6263
# Copy CA certificates
6364
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
6465

docker-compose-distributed-test-with-kafka.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ services:
9494
build:
9595
context: .
9696
dockerfile: Dockerfile.kafka
97+
args:
98+
- LIB_DIR=x86_64-linux-gnu
9799
platform: linux/amd64
98100
command: [ "parseable", "s3-store", ]
99101
expose:
@@ -140,6 +142,8 @@ services:
140142
build:
141143
context: .
142144
dockerfile: Dockerfile.kafka
145+
args:
146+
- LIB_DIR=x86_64-linux-gnu
143147
platform: linux/amd64
144148
command: [ "parseable", "s3-store", ]
145149
expose:

docker-compose-test-with-kafka.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ services:
2828
build:
2929
context: .
3030
dockerfile: Dockerfile.kafka
31+
args:
32+
- LIB_DIR=x86_64-linux-gnu
3133
platform: linux/amd64
3234
command: [ "parseable", "s3-store", ]
3335
ports:

0 commit comments

Comments
 (0)