Added dockerfile

This commit is contained in:
DouweRavers
2025-04-17 14:29:29 +02:00
parent 40bc778f29
commit ef528aa10f
68 changed files with 427 additions and 8446 deletions

22
Dockerfile Normal file
View File

@@ -0,0 +1,22 @@
# Use the official ASP.NET Core runtime as a parent image
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
WORKDIR /app
EXPOSE 5000
# Use the SDK image to build the app
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY ["douwco.be.csproj", "./"]
RUN dotnet restore "./douwco.be.csproj"
COPY . .
WORKDIR "/src/."
RUN dotnet build "douwco.be.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "douwco.be.csproj" -c Release -o /app/publish
# Use the runtime image to run the app
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "douwco.be.dll"]