diff --git a/test/magpiego/Dockerfile b/test/magpiego/Dockerfile index c72df26ade..680c8a94a4 100644 --- a/test/magpiego/Dockerfile +++ b/test/magpiego/Dockerfile @@ -1,6 +1,6 @@ # Issues on M1 mac: https://github.com/docker/for-mac/issues/5831 # it is a multistage docker creation for small magpie image -FROM amd64/golang:1.22-alpine +FROM --platform=${TARGETPLATFORM:-linux/amd64} golang:1.22-alpine WORKDIR /usr/src/tmpapp # Download necessary Go modules @@ -12,7 +12,7 @@ COPY *.go ./ # create the go binary RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o magpiego . -FROM amd64/alpine:3 +FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3 WORKDIR /usr/src/app COPY --from=0 /usr/src/tmpapp/magpiego ./ EXPOSE 3000 diff --git a/test/testrp/Dockerfile b/test/testrp/Dockerfile index ad64cdaa83..9262b7b457 100644 --- a/test/testrp/Dockerfile +++ b/test/testrp/Dockerfile @@ -1,6 +1,6 @@ # Issues on M1 mac: https://github.com/docker/for-mac/issues/5831 # it is a multistage docker creation for small magpie image -FROM amd64/golang:1.22-alpine +FROM --platform=${TARGETPLATFORM:-linux/amd64} golang:1.22-alpine WORKDIR /usr/src/tmpapp # Download necessary Go modules @@ -10,7 +10,7 @@ COPY *.go ./ # create the go binary RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o testrp . -FROM amd64/alpine:3 +FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3 WORKDIR /usr/src/app COPY --from=0 /usr/src/tmpapp/testrp ./ EXPOSE 3000