diff --git a/.github/workflows/taiko-client--docker.yml b/.github/workflows/taiko-client--docker.yml index bca362653c..7ea9e46668 100644 --- a/.github/workflows/taiko-client--docker.yml +++ b/.github/workflows/taiko-client--docker.yml @@ -50,7 +50,7 @@ jobs: with: context: . file: packages/taiko-client/Dockerfile - platforms: linux/arm64 + platforms: linux/arm64,linux/amd64 push: false tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/packages/taiko-client/Dockerfile b/packages/taiko-client/Dockerfile index 7e273e9a54..dea1333dce 100644 --- a/packages/taiko-client/Dockerfile +++ b/packages/taiko-client/Dockerfile @@ -3,7 +3,6 @@ ARG TARGETOS ARG TARGETARCH RUN apt-get update && apt-get install -y git make g++-x86-64-linux-gnu libc6-dev-amd64-cross -#RUN apk update && apk add --no-cache --update gcc musl-dev linux-headers git make build-base WORKDIR /build @@ -12,11 +11,12 @@ COPY go.mod go.sum ./ COPY packages/taiko-client/ packages/taiko-client/ WORKDIR /build/packages/taiko-client - -#RUN CGO_ENABLED=1 CC=x86_64-linux-gnu-gcc GOOS=${TARGETOS} GOARCH=${TARGETARCH} make build -echo "Building for ${TARGETOS}/${TARGETARCH}" -RUN CGO_ENABLED=1 GOOS=${TARGETOS} GOARCH=${TARGETARCH} make build - +RUN echo "TARGETOS=${TARGETOS}, TARGETARCH=${TARGETARCH}" && \ + if [ "$TARGETARCH" = "amd64" ]; then \ + CGO_ENABLED=1 CC=x86_64-linux-gnu-gcc GOOS=${TARGETOS} GOARCH=${TARGETARCH} make build; \ + else \ + make build; \ + fi FROM alpine:latest