diff --git a/Dockerfile b/Dockerfile index f469bbb..8cb4bf3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.20 AS BUILDER +FROM golang:1.21 AS BUILDER LABEL maintainer="Roman Tkalenko" @@ -12,7 +12,7 @@ RUN make all FROM alpine:latest COPY --from=BUILDER /go/bin/clickhouse_exporter /usr/local/bin/clickhouse_exporter -RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/* +RUN apk update && apk add ca-certificates libc6-compat && rm -rf /var/cache/apk/* ENTRYPOINT ["/usr/local/bin/clickhouse_exporter"] CMD ["-scrape_uri=http://localhost:8123"] diff --git a/Makefile b/Makefile index edc8322..15135bb 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ init: build: go install -v - go build + go build -ldflags "-linkmode=external -extldflags '-static' -extldflags '-static'" . test: go test -v -race