-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Install cacerts in docker image (#4)
- Loading branch information
Showing
2 changed files
with
7 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
FROM golang:1.10 AS builder | ||
LABEL maintainer="[email protected]" \ | ||
description="Forwards prometheus DeadMansSwitch alerts to CloudWatch" \ | ||
version="0.0.1" | ||
version="0.0.2" | ||
|
||
RUN useradd -u 10001 deadmanswatch | ||
|
||
|
@@ -13,9 +13,14 @@ COPY ./cmd $GOPATH/src/github.com/KierranM/deadmanswatch/cmd | |
RUN go test ./... | ||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix nocgo -o /deadmanswatch . | ||
|
||
FROM alpine:latest AS cacerts | ||
RUN apk add --update ca-certificates | ||
|
||
FROM scratch | ||
COPY --from=builder /deadmanswatch ./ | ||
COPY --from=builder /etc/passwd /etc/passwd | ||
COPY --from=cacerts /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ | ||
|
||
USER deadmanswatch | ||
WORKDIR / | ||
ENTRYPOINT ["./deadmanswatch"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters