FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build ARG BUILD_CONFIGURATION=Release WORKDIR /src COPY api_cs.csproj . RUN dotnet restore api_cs.csproj COPY . . RUN dotnet build api_cs.csproj -c $BUILD_CONFIGURATION -o ./build RUN dotnet publish api_cs.csproj -c $BUILD_CONFIGURATION -o ./publish -r linux-arm64 --self-contained true # FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS runtime FROM ubuntu AS runtime WORKDIR /app COPY --from=build /src/publish . RUN chmod 777 ./api_cs CMD ./api_cs