-
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.
Merge pull request #135 from equinor/remove_unneccessary_use_of_opera…
…tor_func fix multiplatform docker build performance
- Loading branch information
Showing
3 changed files
with
7 additions
and
25 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 |
---|---|---|
|
@@ -15,7 +15,6 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
arch: [arm64] | ||
target: | ||
- name: "dev" | ||
ref: "refs/heads/main" | ||
|
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,23 +1,19 @@ | ||
FROM docker.io/golang:1.22-alpine3.20 AS builder | ||
|
||
FROM --platform=$BUILDPLATFORM docker.io/golang:1.22-alpine3.20 AS builder | ||
ARG TARGETARCH | ||
ENV CGO_ENABLED=0 \ | ||
GOOS=linux | ||
GOOS=linux \ | ||
GOARCH=${TARGETARCH} | ||
|
||
WORKDIR /src | ||
|
||
# Install project dependencies | ||
COPY go.mod go.sum ./ | ||
RUN go mod download | ||
|
||
# Copy project code | ||
COPY . . | ||
|
||
RUN go build -ldflags="-s -w" -o /build/radix-job-scheduler | ||
|
||
# Final stage, ref https://github.com/GoogleContainerTools/distroless/blob/main/base/README.md for distroless | ||
FROM gcr.io/distroless/static | ||
WORKDIR /app | ||
COPY --from=builder /build/radix-job-scheduler . | ||
|
||
USER 1000 | ||
ENTRYPOINT ["/app/radix-job-scheduler"] |