FROM mcr.microsoft.com/dotnet/sdk:6.0-bullseye-slim AS build-env WORKDIR /App # Copy everything COPY * . # Restore as distinct layers RUN dotnet restore # Build a release RUN dotnet build -c Release -o out # Build runtime image FROM mcr.microsoft.com/dotnet/aspnet:6.0-bullseye-slim WORKDIR /App RUN wget https://files.ivanch.me/api/public/dl/QFCLgtrG/simpleimage.png && \ wget https://files.ivanch.me/api/public/dl/E0VLgWbx/bigimage.png && \ rm -rf runtimes COPY --from=build-env /App/out . ENTRYPOINT ["dotnet", "/App/TCC.APP.dll"]