From 70445069fd7d2a3e31168adcc481081edb123303 Mon Sep 17 00:00:00 2001 From: Marcel Baumgartner Date: Wed, 7 Feb 2024 21:07:38 +0100 Subject: [PATCH] Fixed docker build and ensured a storage folder is created to mount to volume to --- Moonlight/Dockerfile | 4 +++- Moonlight/Moonlight.csproj | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Moonlight/Dockerfile b/Moonlight/Dockerfile index e00ed643..64bd6cd1 100644 --- a/Moonlight/Dockerfile +++ b/Moonlight/Dockerfile @@ -3,7 +3,7 @@ WORKDIR /app EXPOSE 80 EXPOSE 443 -FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:7.0.100-preview.3 AS build WORKDIR /src COPY ["Moonlight/Moonlight.csproj", "Moonlight/"] RUN dotnet restore "Moonlight/Moonlight.csproj" @@ -17,4 +17,6 @@ RUN dotnet publish "Moonlight.csproj" -c Release -o /app/publish /p:UseAppHost=f FROM base AS final WORKDIR /app COPY --from=publish /app/publish . +RUN mkdir -p /app/storage +RUN rm -r /app/storage/* ENTRYPOINT ["dotnet", "Moonlight.dll"] diff --git a/Moonlight/Moonlight.csproj b/Moonlight/Moonlight.csproj index 8b2ece08..ac48f0bc 100644 --- a/Moonlight/Moonlight.csproj +++ b/Moonlight/Moonlight.csproj @@ -47,7 +47,6 @@ -