From 23dc16b8d6e578def2f1aab94fa02ab47e0efaed Mon Sep 17 00:00:00 2001 From: PauliusIvaskevicius <13413990+PauliusIvaskevicius@users.noreply.github.com> Date: Sat, 11 Nov 2023 19:19:11 +0200 Subject: [PATCH] Fix docker image --- DiscordBot.App/Dockerfile => Dockerfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) rename DiscordBot.App/Dockerfile => Dockerfile (59%) diff --git a/DiscordBot.App/Dockerfile b/Dockerfile similarity index 59% rename from DiscordBot.App/Dockerfile rename to Dockerfile index 648a1c4..5e024be 100644 --- a/DiscordBot.App/Dockerfile +++ b/Dockerfile @@ -7,16 +7,17 @@ EXPOSE 443 FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build WORKDIR /src -COPY ["app.csproj", "."] -RUN dotnet restore "./app.csproj" COPY . . + +RUN dotnet restore "./DiscordBot.App/DiscordBot.App.csproj" + WORKDIR "/src/." -RUN dotnet build "app.csproj" -c Release -o /app/build +RUN dotnet build "./DiscordBot.App/DiscordBot.App.csproj" -c Release -o /app/build FROM build AS publish -RUN dotnet publish "app.csproj" -c Release -o /app/publish /p:UseAppHost=false +RUN dotnet publish "./DiscordBot.App/DiscordBot.App.csproj" -c Release -o /app/publish /p:UseAppHost=false FROM base AS final WORKDIR /app COPY --from=publish /app/publish . -ENTRYPOINT ["dotnet", "app.dll"] \ No newline at end of file +ENTRYPOINT ["dotnet", "DiscordBot.App.dll"] \ No newline at end of file