Skip to content

Commit a1b2a64

Browse files
author
Devdutt Shenoi
committed
fix: kafka build on aarch64
1 parent 5fd5b0d commit a1b2a64

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

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

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,22 @@ 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: x86_64-linux-gnu
49+
50+
- name: Build and push aarch64
51+
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
52+
with:
53+
context: .
54+
file: ./Dockerfile.kafka
55+
push: true
56+
tags: parseable/parseable:edge-kafka
57+
platforms: =linux/arm64
58+
build-args: 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

0 commit comments

Comments
 (0)