Skip to content

Commit

Permalink
apply CGO_ENABLED=0
Browse files Browse the repository at this point in the history
Signed-off-by: Boris Glimcher <[email protected]>
  • Loading branch information
glimchb committed Feb 22, 2023
1 parent f3fcdd3 commit 85e800c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ COPY go.mod ./
COPY go.sum ./
RUN go mod download

ENV CGO_ENABLED=0

# build an app
COPY cmd/ cmd/
COPY pkg/ pkg/
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
Expand Down

0 comments on commit 85e800c

Please sign in to comment.