Skip to content

Commit 1e210b2

Browse files
committed
update dockerfile
1 parent 185dddb commit 1e210b2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
# Use the latest stable golang 1.x to compile to a binary
1616
FROM --platform=$BUILDPLATFORM golang:1 AS build
1717

18-
19-
20-
# Install Zig
18+
# Install Zig for CGO cross-compilation
2119
RUN apt-get update && apt-get install -y xz-utils
2220
RUN curl -fL "https://ziglang.org/download/0.15.2/zig-x86_64-linux-0.15.2.tar.xz" -o zig.tar.xz && \
2321
mkdir -p /zig && \
@@ -44,7 +42,7 @@ RUN export ZIG_TARGET="" && \
4442
CC="/zig/zig cc -target ${ZIG_TARGET}" \
4543
CXX="/zig/zig c++ -target ${ZIG_TARGET}" \
4644
go build \
47-
-ldflags "-linkmode external -extldflags '-static' -X github.com/googleapis/genai-toolbox/cmd.buildType=${BUILD_TYPE} -X github.com/googleapis/genai-toolbox/cmd.commitSha=${COMMIT_SHA}" \
45+
-ldflags "-X github.com/googleapis/genai-toolbox/cmd.buildType=${BUILD_TYPE} -X github.com/googleapis/genai-toolbox/cmd.commitSha=${COMMIT_SHA}" \
4846
-o genai-toolbox .
4947

5048
# Final Stage

0 commit comments

Comments
 (0)