Skip to content

Commit

Permalink
Merge pull request #14 from eclipserporg/fix/docker_image
Browse files Browse the repository at this point in the history
Fix docker image
  • Loading branch information
pauliusdotpro authored Nov 11, 2023
2 parents c89fd0b + 23dc16b commit 6ba630a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions DiscordBot.App/Dockerfile → Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
ENTRYPOINT ["dotnet", "DiscordBot.App.dll"]

0 comments on commit 6ba630a

Please sign in to comment.