Initial commit
This commit is contained in:
16
HelloWorldApp/Dockerfile
Normal file
16
HelloWorldApp/Dockerfile
Normal file
@@ -0,0 +1,16 @@
|
||||
# Build stage
|
||||
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
||||
WORKDIR /src
|
||||
|
||||
COPY HelloWorldApp.csproj HelloWorldApp.csproj
|
||||
RUN dotnet restore HelloWorldApp.csproj
|
||||
|
||||
COPY . .
|
||||
RUN dotnet publish -c Release -o /app --no-restore
|
||||
|
||||
# Runtime stage
|
||||
FROM mcr.microsoft.com/dotnet/runtime:10.0
|
||||
WORKDIR /app
|
||||
COPY --from=build /app .
|
||||
|
||||
ENTRYPOINT ["dotnet", "HelloWorldApp.dll"]
|
||||
Reference in New Issue
Block a user