Skip to content

Commit

Permalink
Install cacerts in docker image (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
KierranM authored Nov 28, 2018
1 parent efc066b commit 624e2d2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion Dockerfile
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

Expand All @@ -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"]
2 changes: 1 addition & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/spf13/cobra"
)

const Version = "0.0.1"
const Version = "0.0.2"

func init() {
rootCmd.AddCommand(versionCmd)
Expand Down

0 comments on commit 624e2d2

Please sign in to comment.