# Use the official .NET SDK image to build the app FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env WORKDIR /app # Copy the csproj and restore any dependencies COPY *.csproj ./ RUN dotnet restore # Copy the entire project and build the app COPY . ./ RUN dotnet publish -c Release -o out # Use the official .NET runtime image to run the app FROM mcr.microsoft.com/dotnet/aspnet:6.0 WORKDIR /app COPY --from=build-env /app/out . # Expose port EXPOSE 80 # Entry point to run the application ENTRYPOINT ["dotnet", "DicomMigratorApp.dll"]