forked from DataReply/alertmanager-sns-forwarder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
28 lines (20 loc) · 798 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# builder image
FROM golang:alpine as builder
RUN set -ex && apk --update --no-cache add \
git \
make
RUN adduser -D -g '' forwarder
WORKDIR /go/src/github.com/DataReply/alertmanager-sns-forwarder
COPY . .
RUN make all
# final image
FROM scratch
LABEL maintainer="[email protected]"
# Add sh and other tools for debugging the container
#COPY --from=builder /lib/ld-musl-x86_64.so.1 /lib/ld-musl-x86_64.so.1
#COPY --from=builder /bin/ /bin/
COPY --from=builder /etc/passwd /etc/passwd
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /go/src/github.com/DataReply/alertmanager-sns-forwarder/bin/linux/alertmanager-sns-forwarder /bin/alertmanager-sns-forwarder
USER forwarder
ENTRYPOINT ["/bin/alertmanager-sns-forwarder"]