Skip to content

Commit

Permalink
Disable CGO on build
Browse files Browse the repository at this point in the history
Signed-off-by: Jose R. Gonzalez <jose@flutes.dev>
  • Loading branch information
komish committed Jun 21, 2023
1 parent 4447b0c commit 53b879a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ WORKDIR /tmp/src

COPY . .

RUN go build -o ./out/chart-verifier main.go
RUN CGO_ENABLED=0 go build -o ./out/chart-verifier main.go

FROM registry.access.redhat.com/ubi9/ubi-minimal

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ fmt: install.gofumpt

.PHONY: bin
bin:
go build -o ./out/chart-verifier main.go
CGO_ENABLED=0 go build -o ./out/chart-verifier main.go

.PHONY: lint
lint: install.golangci-lint
$(GOLANGCI_LINT) run

.PHONY: bin_win
bin_win:
env GOOS=windows GOARCH=amd64 go build -o .\out\chart-verifier.exe main.go
env GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -o .\out\chart-verifier.exe main.go

.PHONY: test
test:
Expand Down

0 comments on commit 53b879a

Please sign in to comment.