Skip to content

Commit

Permalink
build(dockerfile): explicitly disable cgo
Browse files Browse the repository at this point in the history
  • Loading branch information
DeadNews committed Feb 18, 2024
1 parent 9acff34 commit 44bc4e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Build the application from source.
FROM golang:1.22.0-alpine@sha256:8e96e6cff6a388c2f70f5f662b64120941fcd7d4b89d62fec87520323a316bd9 AS go-builder

WORKDIR /app

ENV \
# Maunt as dedicated RUN cache.
GOCACHE="/cache/go-build" \
# Disable CGO to build a static binary.
CGO_ENABLED=0

WORKDIR /app

COPY go.mod go.sum cmd ./
RUN --mount=type=cache,target=${GOCACHE} \
go build -o /app/dist/deadnews-template-go ./...
Expand Down

0 comments on commit 44bc4e3

Please sign in to comment.