Skip to content
Permalink
Browse files

Added docker image

  • Loading branch information...
eko committed May 26, 2019
1 parent 69f5ce1 commit 37b4d10c1e6574fc3a44c2497bb1d73c855afc8c
Showing with 25 additions and 1 deletion.
  1. +1 −1 .gitignore
  2. +15 −0 Dockerfile
  3. +9 −0 README.md
@@ -1,4 +1,4 @@
search-api
vendor
bin
tmp
.vscode
@@ -0,0 +1,15 @@
FROM golang:alpine as builder

WORKDIR /go/src/github.com/eko/pihole-exporter
COPY . .

RUN GOOS=linux go build -o binary ./

FROM alpine

LABEL name="pihole-exporter"

WORKDIR /root/
COPY --from=builder /go/src/github.com/eko/pihole-exporter/binary pihole-exporter

CMD ["./pihole-exporter"]
@@ -48,6 +48,15 @@ Then, build the binary (here, an example to run on Raspberry PI ARM architecture
$ GOOS=linux GOARCH=arm GOARM=7 go build -o pihole_exporter .
```

### Using Docker

The exporter is also available as a [Docker image](https://cloud.docker.com/repository/docker/ekofr/pihole-exporter).
You can run it using the following example and pass configuration environment variables:

```
$ docker run -e 'PIHOLE_HOSTNAME=192.168.1.2' ekofr/pihole-exporter:latest
```

## Usage

In order to run the exporter, type the following command (arguments are optional):

0 comments on commit 37b4d10

Please sign in to comment.
You can’t perform that action at this time.