File tree Expand file tree Collapse file tree 1 file changed +6
-12
lines changed
Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change 11FROM mcr.microsoft.com/dotnet/runtime:9.0 AS base
22USER $APP_UID
33WORKDIR /app
4+
45FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
56ARG BUILD_CONFIGURATION=Release
67WORKDIR /src
78COPY ["DisBot-Helper-Bot/DisBot-Helper-Bot.csproj" , "DisBot-Helper-Bot/" ]
89RUN dotnet restore "DisBot-Helper-Bot/DisBot-Helper-Bot.csproj"
910COPY . .
1011WORKDIR "/src/DisBot-Helper-Bot"
11- RUN dotnet publish "./DisBot-Helper-Bot.csproj" -c Release -r linux-x64 \
12- --self-contained true \
13- -p:PublishReadyToRun=true \
14- -p:PublishSingleFile=true \
15- -o /app/publish
12+ RUN dotnet build "./DisBot-Helper-Bot.csproj" -c $BUILD_CONFIGURATION -o /app/build
13+
1614FROM build AS publish
1715ARG BUILD_CONFIGURATION=Release
18- RUN dotnet publish "./DisBot-Helper-Bot.csproj" -c Release -r linux-x64 \
19- --self-contained true \
20- -p:PublishReadyToRun=true \
21- -p:PublishSingleFile=true \
22- -o /app/publish
16+ RUN dotnet publish "./DisBot-Helper-Bot.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
17+
2318FROM base AS final
2419WORKDIR /app
2520COPY --from=publish /app/publish .
26- RUN chmod +x ./DisBot-Helper-Bot
27- CMD ["./DisBot-Helper-Bot" ]
21+ ENTRYPOINT ["dotnet" , "DisBot-Helper-Bot.dll" ]
You can’t perform that action at this time.
0 commit comments