Enable CGO in Dockerfile build step for Linux compilation

This commit is contained in:
2025-05-18 13:46:56 +03:30
parent 686eaec0ad
commit d9fdd6919f

View File

@@ -13,7 +13,7 @@ RUN go mod download
COPY cmd /app/cmd/
COPY internal /app/internal/
RUN CGO_ENABLED=0 GOOS=linux go build -o /CatsOfMastodonGo ./cmd/CatsOfMastodonBotGo/main.go
RUN CGO_ENABLED=1 GOOS=linux go build -o /CatsOfMastodonGo ./cmd/CatsOfMastodonBotGo/main.go
# Deploy the application binary into a lean image
FROM gcr.io/distroless/static-debian12 AS build-release-stage