forked from moira-alert/moira
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.notifier
24 lines (16 loc) · 910 Bytes
/
Dockerfile.notifier
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM golang:1.11.2 as builder
WORKDIR /go/src/github.com/moira-alert/moira
COPY . /go/src/github.com/moira-alert/moira/
RUN go get github.com/kardianos/govendor
RUN govendor sync
ARG GO_VERSION="GoVersion"
ARG GIT_COMMIT="git_Commit"
ARG MoiraVersion="MoiraVersion"
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags "-X main.MoiraVersion=${MoiraVersion} -X main.GoVersion=${GO_VERSION} -X main.GitCommit=${GIT_COMMIT}" -o build/notifier github.com/moira-alert/moira/cmd/notifier
FROM alpine
RUN apk add --no-cache ca-certificates && update-ca-certificates
COPY pkg/notifier/notifier.yml /etc/moira/notifier.yml
COPY pkg/notifier/fancy-template.html /etc/moira/fancy-template.html
COPY --from=builder /go/src/github.com/moira-alert/moira/build/notifier /usr/bin/notifier
COPY --from=builder /usr/local/go/lib/time/zoneinfo.zip /usr/local/go/lib/time/
ENTRYPOINT ["/usr/bin/notifier"]