-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update build and release process (#65)
- Loading branch information
Andrew Suderman
authored
Jan 20, 2022
1 parent
a44e434
commit 23b7519
Showing
6 changed files
with
160 additions
and
79 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,24 +1,5 @@ | ||
FROM golang:1.15 AS build | ||
|
||
ARG version=dev | ||
ARG commit=none | ||
|
||
WORKDIR /go/src/github.com/fairwindsops/nova | ||
ADD . /go/src/github.com/fairwindsops/nova | ||
|
||
RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -a -o nova *.go | ||
RUN VERSION=$version COMMIT=$commit make build-linux | ||
|
||
|
||
FROM alpine:3.13 as alpine | ||
RUN apk --no-cache --update add ca-certificates tzdata && update-ca-certificates | ||
|
||
|
||
FROM scratch | ||
COPY --from=alpine /usr/share/zoneinfo /usr/share/zoneinfo | ||
COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ | ||
COPY --from=alpine /etc/passwd /etc/passwd | ||
|
||
USER nobody | ||
COPY --from=build /go/src/github.com/fairwindsops/nova/nova / | ||
CMD ["/nova"] | ||
COPY nova / | ||
CMD ["/nova"] |
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