Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add dockerfile
  • Loading branch information
vista-octopus committed Jul 26, 2018
commit 5e0e8a03b1c04dbba802b63b03297ada43c9fe4b
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
README.md
LICENSE
Dockerfile
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM golang:1.10 as build-env
ADD . /go/src/github.com/iamseth/azure_sql_exporter
WORKDIR /go/src/github.com/iamseth/azure_sql_exporter
RUN make
RUN mv dist/azure_sql_exporter* dist/azure_sql_exporter

FROM debian:latest
WORKDIR /app
COPY --from=build-env /go/src/github.com/iamseth/azure_sql_exporter/dist/azure_sql_exporter /app/
VOLUME [ "/config" ]
ENTRYPOINT /app/azure_sql_exporter -config.file=/config/config.yaml
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,11 @@ databases:
## Binary releases

Pre-compiled versions may be found in the [release section](https://github.com/iamseth/azure_sql_exporter/releases).

## Docker

A Dockerfile is provided, or images are available on [Docker Hub](https://hub.docker.com/r/benclapp/azure-sql-exporter/). The image is expecting a config.yaml file to exist at /config/config.yaml. To run:

```bash
docker run -d -p 9139:9139 -v ./config.yaml:/config/config.yaml benclapp/azure-sql-exporter:latest
```