Files
webapitest/Dockerfile
2026-03-03 14:57:13 +02:00

15 lines
386 B
Docker

FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR .
COPY . .
RUN ls .
RUN ls ./SampleApi
RUN dotnet publish "SampleApi/SampleApi.csproj" -c Release -o /app/publish
# Stage 2: Run the app using the Runtime
FROM ://mcr.microsoft.com
WORKDIR /app
# Copy the compiled files from the 'build' stage to this stage
COPY --from=build /app/publish .
ENTRYPOINT ["dotnet", "SampleApi.dll"]