File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 1
1
# Copyright 2022 The Kubernetes Authors.
2
2
# SPDX-License-Identifier: Apache-2.0
3
+ ARG TARGETARCH TARGETOS
3
4
4
5
# build
5
- FROM public.ecr.aws/docker/library/golang:1.22.7-bullseye as builder
6
+ FROM --platform=${BUILDPLATFORM} public.ecr.aws/docker/library/golang:1.22.7-bullseye as builder
6
7
ARG VERSION
7
8
ARG COMMIT
8
9
ARG DATE
9
10
RUN mkdir /build
10
11
ADD . /build/
11
12
WORKDIR /build/kustomize
12
- RUN CGO_ENABLED=0 GO111MODULE=on go build \
13
+ RUN CGO_ENABLED=0 GO111MODULE=on GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build \
13
14
-ldflags="-s -X sigs.k8s.io/kustomize/api/provenance.version=${VERSION} \
14
15
-X sigs.k8s.io/kustomize/api/provenance.buildDate=${DATE}"
15
16
Original file line number Diff line number Diff line change 29
29
COMMIT=$(git rev-parse HEAD)
30
30
--build-arg
31
31
DATE=$(date -u +%FT%TZ)
32
+ --platform
33
+ linux/amd64,linux/arm64
32
34
.
33
35
34
36
images :
You can’t perform that action at this time.
0 commit comments