Add multi-architecture Docker build support via buildx

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-28 15:27:48 -07:00
parent 298c960808
commit c04db89633
2 changed files with 46 additions and 6 deletions
+3 -1
View File
@@ -30,7 +30,9 @@ COPY . .
RUN make proto-gen
# Build binary with version information
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo \
ARG TARGETOS=linux
ARG TARGETARCH=amd64
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -a -installsuffix cgo \
-ldflags "-X main.Version=${VERSION} -X main.GitCommit=${GIT_COMMIT} -X main.BuildTime=${BUILD_TIME} ${BUILD_FLAGS}" \
-o server ./cmd/server