From 85e800cf8cfaf958368974533eb5cacf7180a276 Mon Sep 17 00:00:00 2001 From: Boris Glimcher Date: Wed, 22 Feb 2023 23:11:12 +0200 Subject: [PATCH] apply CGO_ENABLED=0 Signed-off-by: Boris Glimcher --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3fc4e31..7e34814 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,8 @@ COPY go.mod ./ COPY go.sum ./ RUN go mod download +ENV CGO_ENABLED=0 + # build an app COPY cmd/ cmd/ COPY pkg/ pkg/ @@ -17,7 +19,7 @@ RUN go build -v -o /opi-smbios-bridge ./cmd/... # second stage to reduce image size FROM alpine:3.17 -RUN apk add --no-cache libc6-compat hwdata && rm -rf /var/cache/apk/* +RUN apk add --no-cache hwdata && rm -rf /var/cache/apk/* COPY --from=builder /opi-smbios-bridge / COPY --from=docker.io/fullstorydev/grpcurl:v1.8.7-alpine /bin/grpcurl /usr/local/bin/ EXPOSE 50051