-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add harbor arm build parameters
Signed-off-by: Jeremy-boo <bozhu@alauda.io>
- Loading branch information
Jeremy-boo
committed
Nov 20, 2022
1 parent
498e7e2
commit 1e70697
Showing
11 changed files
with
100 additions
and
19 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
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,10 +1,19 @@ | ||
FROM golang:1.18.8 | ||
ARG cgo_enabled | ||
ARG go_os | ||
ARG go_arch | ||
|
||
FROM golang:1.18.7 | ||
|
||
ENV DISTRIBUTION_DIR /go/src/github.com/docker/distribution | ||
ENV BUILDTAGS include_oss include_gcs | ||
ENV GO111MODULE auto | ||
|
||
ENV CGO_ENABLED=${cgo_enabled} | ||
ENV GOOS=${go_os} | ||
ENV GOARCH=${go_arch} | ||
|
||
WORKDIR $DISTRIBUTION_DIR | ||
COPY . $DISTRIBUTION_DIR | ||
|
||
RUN CGO_ENABLED=0 make PREFIX=/go clean binaries | ||
RUN make PREFIX=/go clean binaries |
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,7 +1,11 @@ | ||
ARG cgo_enabled | ||
ARG go_os | ||
ARG go_arch | ||
|
||
FROM golang:1.18.8 | ||
|
||
ADD . /go/src/github.com/aquasecurity/harbor-scanner-trivy/ | ||
WORKDIR /go/src/github.com/aquasecurity/harbor-scanner-trivy/ | ||
|
||
RUN export GOOS=linux GO111MODULE=on CGO_ENABLED=0 && \ | ||
RUN export GOOS=${go_os} GO111MODULE=on CGO_ENABLED=${cgo_enabled} GOARCH=${go_arch} && \ | ||
go build -o scanner-trivy cmd/scanner-trivy/main.go |
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