Skip to content

Commit

Permalink
Move build to clickhouse_exporter by Clickhouse (#1)
Browse files Browse the repository at this point in the history
* use latest commit from Clickhouse/clickhouse_exporter
  • Loading branch information
gyrter authored Apr 6, 2021
1 parent e5b62f5 commit 7dd54fa
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 7dd54fa

Please sign in to comment.