# Use the official .NET SDK image to build and publish the app FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build WORKDIR /app # Copy everything and build COPY . . RUN dotnet publish -c Release -o out # Use the official .NET runtime image for a smaller container FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS runtime WORKDIR /app COPY --from=build /app/out ./ ENTRYPOINT ["dotnet", "DicomMigratorApp.dll"]