docs icon indicating copy to clipboard operation
docs copied to clipboard

Dapr microservices tutorial ARM image support

Open kendallroden opened this issue 1 year ago • 1 comments

I am assuming the image that is used for the radius Dapr microservices tutorial is compiled to run on AMD machines- if you have an M1 mac you will have issues because the code container is failing to execute as it is not compatible with the ARM cluster I am running on Kind.

I would propose that there be an image tag for platform compilation. I will try the workaround of building and pushing my own image, but I am guessing others might run into this problem if they are using a local cluster on M1 mac

AB#11198

kendallroden avatar Feb 15 '24 21:02 kendallroden

I confirmed that was the problem. Second problem is the base image used by the frontend app:

Dockerfile:1

1 | >>> FROM mcr.microsoft.com/dotnet/sdk:5.0-alpine AS build 2 | WORKDIR /src 3 |

ERROR: failed to solve: mcr.microsoft.com/dotnet/sdk:5.0-alpine: no match for platform in manifest: not found

I modified the dockerfile accordingly

FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
WORKDIR /src

COPY *.csproj .
RUN dotnet restore -r linux-arm64

COPY . .
RUN dotnet publish -c release -o /output/ --no-restore -r linux-arm64

FROM mcr.microsoft.com/dotnet/aspnet:5.0
WORKDIR /app
COPY --from=build /output ./
ENTRYPOINT ["dotnet", "ui.dll"]

kendallroden avatar Feb 15 '24 22:02 kendallroden