generated from LinuxSuRen/github-go
-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support to build and release mutiple arch images
- Loading branch information
1 parent
be5a4a3
commit 41f45e4
Showing
6 changed files
with
82 additions
and
22 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
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,19 @@ | ||
FROM docker.io/golang:1.19 AS builder | ||
|
||
WORKDIR /workspace | ||
COPY cmd/ cmd/ | ||
COPY hack/ hack/ | ||
COPY mock/ mock/ | ||
COPY pkg/ pkg/ | ||
COPY main.go . | ||
COPY README.md README.md | ||
COPY go.mod go.mod | ||
COPY go.sum go.sum | ||
RUN CGO_ENABLED=0 go build -ldflags "-w -s" -o /usr/local/bin/hd . | ||
|
||
FROM alpine:3.10 | ||
|
||
COPY hd /usr/local/bin/hd | ||
COPY --from=builder /usr/local/bin/hd /usr/local/bin/hd | ||
RUN hd fetch | ||
|
||
CMD ["hd"] |
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