Skip to content

Commit d2263cf

Browse files
made cross compile instead of qemu
1 parent 2ca0da0 commit d2263cf

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,21 @@
2020
# directly replaced. See here, and note that "stage" parameter mentioned there has been renamed to
2121
# "build-context": https://github.com/docker/buildx/pull/904#issuecomment-1005871838
2222
FROM golang:1.24.6-bookworm@sha256:bdc7cfd953b2701fcd95fd591ea3d788f41e4b74f21f1787b9f9843a28e72196 AS builder-base
23-
FROM builder-base AS builder
23+
FROM --platform=$BUILDPLATFORM builder-base AS builder
2424

2525
ARG TARGETARCH
2626

2727
ENV GOPATH=/gopath/
2828
ENV PATH=$GOPATH/bin:$PATH
2929

30-
RUN apt-get update --fix-missing && apt-get --yes install libsystemd-dev gcc-aarch64-linux-gnu
30+
RUN apt-get update --fix-missing && apt-get --yes install libsystemd-dev gcc-aarch64-linux-gnu gcc-x86-64-linux-gnu
3131
RUN go version
3232

3333
COPY . /gopath/src/k8s.io/node-problem-detector/
3434
WORKDIR /gopath/src/k8s.io/node-problem-detector
35-
RUN GOARCH=${TARGETARCH} make bin/node-problem-detector bin/health-checker bin/log-counter
35+
RUN GOARCH=${TARGETARCH} make bin/node-problem-detector
36+
RUN GOARCH=${TARGETARCH} make bin/health-checker
37+
RUN GOARCH=${TARGETARCH} make bin/log-counter
3638

3739
FROM registry.k8s.io/build-image/debian-base:bookworm-v1.0.5@sha256:dd9c1f36c33b410480f6e6dcdfc075b0dfcab2c137953dd40189dbd06bdf9938 AS base
3840

0 commit comments

Comments
 (0)