moved dockerfile

This commit is contained in:
limited_dev 2023-02-12 20:41:47 +01:00
parent df1ac86636
commit db1d4822d4

View file

@ -8,13 +8,14 @@ WORKDIR /src
COPY ["ImageBoardServerApp/ImageBoardServerApp.csproj", "ImageBoardServerApp/"] COPY ["ImageBoardServerApp/ImageBoardServerApp.csproj", "ImageBoardServerApp/"]
RUN dotnet restore "ImageBoardServerApp/ImageBoardServerApp.csproj" RUN dotnet restore "ImageBoardServerApp/ImageBoardServerApp.csproj"
COPY . . COPY . .
WORKDIR "/src/BlazorServerTest" RUN dotnet build "ImageBoardServerApp/ImageBoardServerApp.csproj" -c Release -o /app/build
RUN dotnet build "BlazorServerTest.csproj" -c Release -o /app/build
FROM build AS publish FROM build AS publish
RUN dotnet publish "ImageBoardServerApp.csproj" -c Release -o /app/publish RUN dotnet publish "ImageBoardServerApp/ImageBoardServerApp.csproj" -c Release -o /app/publish
FROM base AS final FROM base AS final
WORKDIR /app WORKDIR /app
COPY --from=publish /app/publish . COPY --from=publish /app/publish .
RUN dotnet tool install --global dotnet-ef
RUN dotnet ef database update
ENTRYPOINT ["dotnet", "ImageBoardServerApp.dll"] ENTRYPOINT ["dotnet", "ImageBoardServerApp.dll"]