Skip to content

Commit 59c8a10

Browse files
authored
fix: resolve CGO build failure by aligning builder and runtime env (#1925)
Signed-off-by: varungupta <varungup90@gmail.com>
1 parent 28837ad commit 59c8a10

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

build/container/Dockerfile.gateway

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,15 @@ RUN ldd /workspace/gateway-plugins | awk '{if ($3 ~ /^\//) print $3}' | xargs -I
3434

3535
# Use distroless as minimal base image to package the manager binary
3636
# Refer to https://github.com/GoogleContainerTools/distroless for more details
37-
FROM gcr.io/distroless/base:nonroot
37+
FROM debian:bookworm-slim
38+
RUN apt-get update && apt-get install -y \
39+
libzmq5 \
40+
libkrb5-3 \
41+
libstdc++6 \
42+
&& rm -rf /var/lib/apt/lists/*
3843
WORKDIR /
3944
COPY --from=builder /workspace/gateway-plugins .
40-
COPY --from=builder /workspace/deps /gateway-plugins-lib
41-
ENV LD_LIBRARY_PATH=/gateway-plugins-lib
45+
RUN groupadd --gid 65532 nonroot && useradd --system --uid 65532 --gid 65532 nonroot
4246
USER 65532:65532
4347

4448
ENTRYPOINT ["/gateway-plugins"]

0 commit comments

Comments
 (0)