-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from grafana/add-ca-certs
Switch to alpine build image and include ca certs
- Loading branch information
Showing
2 changed files
with
12 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,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"] |
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,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"] |