another attempt that runs but is stuck in a loop?

This commit is contained in:
2023-03-20 16:58:48 +01:00
parent 9fa7e21406
commit cc6a7aa6d2
5 changed files with 37 additions and 17 deletions

33
Dockerfile Normal file
View File

@@ -0,0 +1,33 @@
#FROM mcr.microsoft.com/dotnet/sdk:7.0 AS base
#WORKDIR /app
#
#FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
#COPY ../ /src/
#WORKDIR /src
#RUN dotnet build "MauMau-Server.csproj" -c Release -o out
#
#FROM build AS publish
#RUN dotnet publish "MauMau-Server.csproj" -c Release -o /app/publish
#
#FROM base AS final
#WORKDIR /app
#COPY --from=publish /app/publish .
#ENTRYPOINT ["dotnet", "MauMau-Server.dll"]
# https://hub.docker.com/_/microsoft-dotnet
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /source
# copy csproj and restore as distinct layers
COPY *.csproj .
RUN dotnet restore --use-current-runtime
# copy everything else and build app
COPY . .
RUN dotnet publish -c Release -o /out --use-current-runtime --self-contained false --no-restore
# final stage/image
FROM mcr.microsoft.com/dotnet/aspnet:7.0
COPY --from=build . .
EXPOSE 5000
CMD ["dotnet", "MauMau-Server.dll"]