File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 6262 uses : docker/build-push-action@v4
6363 with :
6464 context : .
65+ platforms : linux/amd64,linux/arm64
6566 tags : ghcr.io/openclarity/grype-server:${{ inputs.image_tag }}
6667 file : Dockerfile
6768 push : ${{ inputs.push }}
Original file line number Diff line number Diff line change 1- FROM golang:1.20.4-alpine AS builder
1+ FROM --platform=$BUILDPLATFORM golang:1.20.4-alpine AS builder
22
33RUN apk add --update --no-cache gcc g++
44
@@ -11,7 +11,11 @@ RUN go mod download
1111
1212# Copy and build backend code
1313COPY grype-server .
14- RUN go build -o grype-server ./cmd/grype-server/main.go
14+
15+ ARG TARGETOS
16+ ARG TARGETARCH
17+
18+ RUN GOOS=$TARGETOS GOARCH=$TARGETARCH go build -o grype-server ./cmd/grype-server/main.go
1519
1620FROM alpine:3.17
1721
You can’t perform that action at this time.
0 commit comments