You've already forked postgres_exporter
mirror of
https://github.com/prometheus-community/postgres_exporter.git
synced 2025-08-08 04:42:07 +03:00
Add cross-compilation Makefile targets and tar-based releases.
Revamp the build system to be more inline with other Prometheus exporters. Notably add Darwin and Windows build targets, and add support for releases using tar files.
This commit is contained in:
23
tools/vendor/github.com/GoASTScanner/gas/Dockerfile
generated
vendored
Normal file
23
tools/vendor/github.com/GoASTScanner/gas/Dockerfile
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
# Docker version must be 17.05 or higher to allow multistage build
|
||||
# See build and run instructions in README.md
|
||||
|
||||
# Builds Gas for utilization
|
||||
FROM golang:1.8.1-alpine as builder
|
||||
ENV workspace /go/src/github.com/GoASTScanner/gas
|
||||
ENV GOPATH /go
|
||||
COPY . $workspace
|
||||
WORKDIR $workspace
|
||||
|
||||
RUN go vet $(go list ./... | grep -v /vendor/)
|
||||
RUN CGO_ENABLED=0 go build -o gas .
|
||||
|
||||
########################################################
|
||||
|
||||
# Runs Gas on all Go files in the current directory when
|
||||
# 'docker run' command in README is given
|
||||
FROM alpine:3.6
|
||||
|
||||
COPY --from=builder /go/src/github.com/GoASTScanner/gas/gas /
|
||||
|
||||
# Mounted directory should be placed into the workdir
|
||||
CMD /gas $(find . -path ./vendor -prune -o -type f -name "*.go")
|
Reference in New Issue
Block a user