-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use prometheus/common/log The lib github.com/prometheus/log has been deprecated in favor of github.com/prometheus/common/log. * Lock external dependencies with dep tool * Dockerfile: use dep tool, reduce context, indent
- Loading branch information
1 parent
2142193
commit 40e9421
Showing
6 changed files
with
119 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.git | ||
vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
nginx_exporter | ||
vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,21 @@ | ||
FROM golang:1.9 | ||
LABEL maintainer="@discordianfish" | ||
WORKDIR /go/src/github.com/discordianfish/nginx_exporter | ||
ENV GOOS=linux CGO_ENABLED=0 | ||
COPY . . | ||
RUN go get -d && go build | ||
FROM golang:1.9 | ||
LABEL maintainer="@discordianfish" | ||
|
||
# Install dep tool | ||
ARG DEP_VERSION=v0.3.2 | ||
ARG DEP_SHA256=322152b8b50b26e5e3a7f6ebaeb75d9c11a747e64bbfd0d8bb1f4d89a031c2b5 | ||
RUN wget -q https://github.com/golang/dep/releases/download/${DEP_VERSION}/dep-linux-amd64 -O /usr/local/bin/dep \ | ||
&& echo "${DEP_SHA256} /usr/local/bin/dep" | sha256sum -c - \ | ||
&& chmod 755 /usr/local/bin/dep | ||
|
||
FROM quay.io/prometheus/busybox:glibc | ||
EXPOSE 9113 | ||
COPY --from=0 /go/src/github.com/discordianfish/nginx_exporter/nginx_exporter /bin/ | ||
USER nobody | ||
ENTRYPOINT [ "/bin/nginx_exporter" ] | ||
ENV GOOS=linux CGO_ENABLED=0 | ||
WORKDIR /go/src/github.com/discordianfish/nginx_exporter | ||
COPY Gopkg.* *.go ./ | ||
RUN dep ensure --vendor-only \ | ||
&& go install | ||
|
||
FROM quay.io/prometheus/busybox:glibc | ||
EXPOSE 9113 | ||
COPY --from=0 /go/bin/nginx_exporter /usr/local/bin/ | ||
USER nobody | ||
ENTRYPOINT [ "/usr/local/bin/nginx_exporter" ] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[[constraint]] | ||
name = "github.com/prometheus/client_golang" | ||
version = "0.8.0" | ||
|
||
[[constraint]] | ||
branch = "master" | ||
name = "github.com/prometheus/common" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters