diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..33ec1e5fb06956e77035947117aff8697f86a1bd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM alpine:3.5 + +RUN apk add --no-cache ca-certificates + +ADD apache_exporter / + +EXPOSE 9117 +ENTRYPOINT ["/apache_exporter"] \ No newline at end of file diff --git a/README.md b/README.md index 90496a4b77078dfb6d8345252eda62cc39c24327..9179b22c4a90696060e734f3c4ad129b4bea0f5b 100644 --- a/README.md +++ b/README.md @@ -21,3 +21,20 @@ Help on flags: Tested on Apache 2.2 and Apache 2.4. +# Using Docker + +## Build + +Run the following commands from the project root directory. + +``` +env GOOS=linux GOARCH=amd64 go build . +docker build -t apache_exporter . +``` + +## Run + +``` +docker run -d -p 9117:9117 apache_exporter \ + -scrape_uri "https://your.server.com/server-status/?auto" +``` \ No newline at end of file