Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM golang:1.18-alpine AS builder
WORKDIR /build
RUN apk update && apk upgrade && apk add git
COPY . /build/
RUN go build

FROM alpine:latest
COPY --from=builder /build/multilog_exporter /multilog_exporter
CMD ["sh", "-c", "/multilog_exporter --metrics.listen-addr ${MLEX_LISTEN:-0.0.0.0:9144} --config.file /mlex.yaml"]
12 changes: 12 additions & 0 deletions README-docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Build a local docker image
```
docker build . -t yopur-repo/multilog-exporter:your-tag
```

# Run multilog_exporter
```
docker run -it -p 9144:9144 \
-v /var/log/:/logs/:ro \
-v $(pwd)/doc/example.yaml:/mlex.yaml:ro \
your-repo/multilog-exporter:your-tag
```