-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create dockerfile and add exporter to docker-compose for testing
- Loading branch information
1 parent
562bd30
commit faf0445
Showing
3 changed files
with
27 additions
and
0 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 @@ | ||
data | ||
mongodb-query-exporter |
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,16 @@ | ||
FROM golang:1.13-alpine as builder | ||
ENV CGO_ENABLED=0 | ||
WORKDIR /go/src/app | ||
COPY go.* ./ | ||
RUN go mod download && go mod verify | ||
COPY . . | ||
|
||
RUN go build -ldflags="-s -w" | ||
|
||
FROM scratch | ||
LABEL maintainer="patrick246" | ||
COPY --from=builder /etc/ssl/cert.pem /etc/ssl/cert.pem | ||
COPY --from=builder /go/src/app/mongodb-query-exporter /mongodb-query-exporter | ||
|
||
ENTRYPOINT ["/mongodb-query-exporter"] | ||
EXPOSE 9736 |
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