13 lines
387 B
Docker
13 lines
387 B
Docker
# Stage 1: Build the app using the SDK
|
|
FROM ://mcr.microsoft.com AS build
|
|
WORKDIR /src
|
|
COPY . .
|
|
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"]
|