diff --git a/Dockerfile b/Dockerfile index 30d6f34..8161bda 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,20 @@ -FROM golang:1.14.0-alpine3.11 AS BUILD +FROM golang:1.15-alpine3.12 AS BUILD -ENV CLICKHOUSE_EXPORTER_RELEASE v0.1.0 +ENV CLICKHOUSE_EXPORTER_RELEASE master +ENV CLICKHOUSE_EXPORTER_COMMIT 3c6a60b49e94a35a3a109a362b77381ebc364d49 ENV BUILD_PATH /go/src/github.com/Percona-Lab -ENV GIT_REPO https://github.com/Percona-Lab/clickhouse_exporter.git +ENV GIT_REPO https://github.com/ClickHouse/clickhouse_exporter.git RUN mkdir -p ${BUILD_PATH} && \ apk add --no-cache make git && \ cd ${BUILD_PATH} && \ git clone ${GIT_REPO} -b ${CLICKHOUSE_EXPORTER_RELEASE} && \ cd clickhouse_exporter && \ - make init && make build + git checkout ${CLICKHOUSE_EXPORTER_COMMIT} && \ + export GO111MODULE=on && make init && \ + unset GO111MODULE && make build -FROM alpine:3.11 +FROM alpine:3.12 COPY --from=BUILD /go/bin/clickhouse_exporter /usr/local/bin/clickhouse_exporter