Skip to content

Commit

Permalink
feat(taiko-client): build using cross-compilation (#17564)
Browse files Browse the repository at this point in the history
  • Loading branch information
mask-pp authored Jun 12, 2024
1 parent df90fd4 commit e66a0c8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/taiko-client/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
Expand Down

0 comments on commit e66a0c8

Please sign in to comment.