FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build WORKDIR /app # Copy only what is neccesary for the build, # so that small changes dont reset the whole build COPY Controllers ./Controllers COPY Migrations ./Migrations COPY Model ./Model COPY Properties ./Properties COPY Program.cs . COPY Trazo.csproj . COPY WeatherForecast.cs . COPY appsettings.json . RUN dotnet restore RUN dotnet publish -c Release -r linux-musl-x64 -o out FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine WORKDIR /app COPY --from=build /app/out . CMD ["./Trazo"]