radius-project / docs

Documentation for Radius
https://docs.radapp.io
Apache License 2.0
24 stars 41 forks source link

Dapr microservices tutorial ARM image support #1046

Open kendallroden opened 7 months ago

kendallroden commented 7 months ago

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 commented 7 months ago

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"]