Fixed docker build and ensured a storage folder is created to mount to volume to

This commit is contained in:
Marcel Baumgartner 2024-02-07 21:07:38 +01:00
parent 423616b9f3
commit 70445069fd
2 changed files with 3 additions and 2 deletions

View file

@ -3,7 +3,7 @@ WORKDIR /app
EXPOSE 80 EXPOSE 80
EXPOSE 443 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 WORKDIR /src
COPY ["Moonlight/Moonlight.csproj", "Moonlight/"] COPY ["Moonlight/Moonlight.csproj", "Moonlight/"]
RUN dotnet restore "Moonlight/Moonlight.csproj" 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 FROM base AS final
WORKDIR /app WORKDIR /app
COPY --from=publish /app/publish . COPY --from=publish /app/publish .
RUN mkdir -p /app/storage
RUN rm -r /app/storage/*
ENTRYPOINT ["dotnet", "Moonlight.dll"] ENTRYPOINT ["dotnet", "Moonlight.dll"]

View file

@ -47,7 +47,6 @@
<Folder Include="Features\Servers\Http\Resources\" /> <Folder Include="Features\Servers\Http\Resources\" />
<Folder Include="Features\StoreSystem\Helpers\" /> <Folder Include="Features\StoreSystem\Helpers\" />
<Folder Include="Features\Ticketing\Models\Abstractions\" /> <Folder Include="Features\Ticketing\Models\Abstractions\" />
<Folder Include="storage\plugins\" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>