forked from yonahd/kor
-
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.
chore: update to golang 1.21 and scratch (yonahd#141)
- update to golang 1.21.4 - move builder to debian builder - update image to use scratch due to static binary - add ldflags to remove debug data from binary in image ``` kor-test latest 6d556f53c70c 4 seconds ago 39.1MB yonahdissen/kor latest 728d820e60ed 4 days ago 61.8MB ```
- Loading branch information
Showing
5 changed files
with
16 additions
and
8 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
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
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,12 +1,13 @@ | ||
FROM golang:1.20.2-alpine AS builder | ||
FROM golang:1.21 AS builder | ||
|
||
WORKDIR /build | ||
COPY . . | ||
ENV CGO_ENABLED 0 | ||
RUN go build . | ||
RUN go build -a -trimpath -ldflags "-s -w" . | ||
|
||
FROM alpine:3.18 | ||
FROM scratch | ||
|
||
COPY --from=builder /build/kor /usr/bin/kor | ||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt | ||
ENTRYPOINT [ "/usr/bin/kor" ] | ||
CMD ["--help"] |
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,6 +1,6 @@ | ||
module github.com/yonahd/kor | ||
|
||
go 1.20 | ||
go 1.21 | ||
|
||
require ( | ||
github.com/fatih/color v1.15.0 | ||
|
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