-
Notifications
You must be signed in to change notification settings - Fork 2
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 #8 from narqo/docker-multiplatform
ci: build multi-platform docker image
- Loading branch information
Showing
4 changed files
with
56 additions
and
28 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
/dist |
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,8 +1,10 @@ | ||
FROM alpine as build | ||
|
||
RUN apk add --update --no-cache ca-certificates | ||
FROM golang:1.15-alpine as builder | ||
RUN apk add --update --no-cache build-base ca-certificates | ||
WORKDIR /go/src/github-weather | ||
COPY . /go/src/github-weather | ||
RUN CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' -o bin/github-weather . | ||
|
||
FROM scratch | ||
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt | ||
COPY github-weather /bin/github-weather | ||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt | ||
COPY --from=builder /go/src/github-weather/bin/github-weather /bin/github-weather | ||
ENTRYPOINT ["/bin/github-weather"] |