diff --git a/packages/taiko-client/Dockerfile b/packages/taiko-client/Dockerfile index 6e3a83944b6..36045f42522 100644 --- a/packages/taiko-client/Dockerfile +++ b/packages/taiko-client/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21-alpine as builder +FROM --platform=${BUILDPLATFORM} golang:1.21-alpine as builder RUN apk update && apk add --no-cache --update gcc musl-dev linux-headers git make build-base @@ -10,7 +10,10 @@ COPY packages/taiko-client/ packages/taiko-client/ WORKDIR /build/packages/taiko-client -RUN --mount=type=cache,target=/root/.cache/go-build,sharing=locked \ +ARG TARGETOS +ARG TARGETARCH +RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} \ + --mount=type=cache,target=/root/.cache/go-build,sharing=locked \ make build FROM alpine:latest