Skip to content

Commit

Permalink
Merge pull request #25 from grafana/add-ca-certs
Browse files Browse the repository at this point in the history
Switch to alpine build image and include ca certs
  • Loading branch information
jotdl authored Apr 25, 2024
2 parents 0586017 + 63016e9 commit 28ec178
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion Dockerfile.ic-assignment
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
FROM golang:1.22 AS build
FROM golang:1.22-alpine AS build

RUN apk --no-cache add --no-check-certificate ca-certificates \
&& update-ca-certificates

WORKDIR /src
COPY . /src
RUN CGO_ENABLED=0 go build -o /ic-assignment /src/cmd/ic-assignment

FROM scratch
COPY --from=build /ic-assignment /ic-assignment
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/

ENTRYPOINT ["/ic-assignment"]
7 changes: 6 additions & 1 deletion Dockerfile.regex-labeler
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
FROM golang:1.22 AS build
FROM golang:1.22-alpine AS build

RUN apk --no-cache add --no-check-certificate ca-certificates \
&& update-ca-certificates

WORKDIR /src
COPY . /src
RUN CGO_ENABLED=0 go build -o /regex-labeler /src/cmd/regex-labeler

FROM scratch
COPY --from=build /regex-labeler /regex-labeler
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/

ENTRYPOINT ["/regex-labeler"]

0 comments on commit 28ec178

Please sign in to comment.