Skip to content

Commit

Permalink
build: add gcc for cgo
Browse files Browse the repository at this point in the history
  • Loading branch information
GalvinGao committed Jul 29, 2023
1 parent cd0e62a commit 16684a2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ COPY go.sum ./
RUN go mod download
COPY . .

# add gcc for cgo
RUN apk add --no-cache gcc musl-dev

# inject versioning information & build the binary
# appsec: datadog ASM
RUN export BUILD_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ"); export CGO_ENABLED=1; go build -v -tags appsec -o backend -ldflags "-X exusiai.dev/backend-next/internal/pkg/bininfo.Version=$VERSION -X exusiai.dev/backend-next/internal/pkg/bininfo.BuildTime=$BUILD_TIME" .
Expand Down

0 comments on commit 16684a2

Please sign in to comment.