Skip to content

Commit 8eee48c

Browse files
committed
chore: Disable CGO to make binary compatible with alpine
1 parent de79f05 commit 8eee48c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.goreleaser.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ builds:
1414
goarch:
1515
- amd64
1616
- arm64
17+
env:
18+
- CGO_ENABLED=0
1719
ignore:
1820
- goos: windows
1921
goarch: arm64

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ COPY . /src
66

77
RUN go test -v -vet=off ./...
88

9-
RUN GOOS=linux GARCH=amd64 go build -o git-semver -ldflags="-s -w" cli/main.go
9+
RUN GOOS=linux GARCH=amd64 CGO_ENABLED=0 go build -o git-semver -ldflags="-s -w" cli/main.go
1010

1111
FROM alpine:3.17
1212

0 commit comments

Comments
 (0)