From 53e19b23e0736161da7804de0a297cefe13f6a71 Mon Sep 17 00:00:00 2001 From: Yetkin Timocin Date: Fri, 19 Jul 2024 10:05:34 -0700 Subject: [PATCH] Update testrp and magpie Dockerfiles (#7745) # Description Update testrp and magpie Dockerfiles ## Type of change - This pull request fixes a bug in Radius and has an approved issue (issue link required). Fixes: #7743 Signed-off-by: ytimocin --- test/magpiego/Dockerfile | 4 ++-- test/testrp/Dockerfile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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