File tree Expand file tree Collapse file tree 2 files changed +9
-35
lines changed
Expand file tree Collapse file tree 2 files changed +9
-35
lines changed Original file line number Diff line number Diff line change 1- FROM frolvlad/alpine-glibc:alpine-3.5
2-
3- ARG PROMETHEUS_SQL_VERSION=1.2.0
4- ARG PKG_FILE=prometheus-sql-linux-amd64.tar.gz
5- ARG PKG_URL=https://github.com/chop-dbhi/prometheus-sql/releases/download/$PROMETHEUS_SQL_VERSION/$PKG_FILE
6-
7- RUN apk update
8- RUN apk add curl
9-
10- # Workaround to publish Github release before curl fetches it.
11- RUN sleep 60
12-
13- RUN mkdir -p /opt/prometheus-sql/bin \
14- && curl --retry 5 --retry-delay 15 --retry-max-time 120 -SL $PKG_URL \
15- | tar -xzC /opt/prometheus-sql/bin \
16- && ln -s /opt/prometheus-sql/bin/linux-amd64/prometheus-sql /usr/local/bin/
17-
18- RUN apk del curl
19- RUN rm /var/cache/apk/*
1+ # Requires Docker v17.06 or later
2+ FROM golang:1.8.3 as builder
3+ RUN mkdir -p /go/src/app
4+ WORKDIR /go/src/app
5+ COPY . /go/src/app
6+ RUN go-wrapper download
7+ RUN go-wrapper install
208
9+ FROM frolvlad/alpine-glibc:alpine-3.5
10+ COPY --from=builder /go/bin/app /usr/local/bin/prometheus-sql
2111EXPOSE 8080
22-
2312ENTRYPOINT ["/usr/local/bin/prometheus-sql" , "-host" , "0.0.0.0" ]
24-
2513# Default command assumes the SQL agent is linked.
2614CMD ["-service" , "http://sqlagent:5000" ]
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments