Skip to content

Commit

Permalink
Use CGO_ENABLED=0 for binary in container image to avoid GLIBC errors
Browse files Browse the repository at this point in the history
  • Loading branch information
frittentheke committed Feb 27, 2024
1 parent d704965 commit 256b9fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ WORKDIR /

COPY . .

RUN go mod download && go build -o /openstack-exporter .
RUN go mod download && CGO_ENABLED=0 go build -o /openstack-exporter .

FROM gcr.io/distroless/base:nonroot as openstack-exporter

Expand Down

0 comments on commit 256b9fa

Please sign in to comment.