From 28761f6d00f28e2e445457b78fcc9a1449ede7ad Mon Sep 17 00:00:00 2001 From: "Jose R. Gonzalez" Date: Wed, 21 Jun 2023 09:43:09 -0500 Subject: [PATCH] Disable CGO on build Signed-off-by: Jose R. Gonzalez --- Dockerfile | 2 +- Makefile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index d3976649..c08e3ebe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/Makefile b/Makefile index dfc251af..2d4f8a9a 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ 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 @@ -41,7 +41,7 @@ lint: install.golangci-lint .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: