diff --git a/Budet-cho-bot/Dockerfile b/Budet-cho-bot/Dockerfile index 2a195c4..e9fe4a5 100644 --- a/Budet-cho-bot/Dockerfile +++ b/Budet-cho-bot/Dockerfile @@ -1,14 +1,19 @@ -FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build +FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base WORKDIR /app +FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build +WORKDIR /src COPY ["/Budet-cho-bot", "Budet-cho-bot"] COPY ["/Config.json", "Config.json"] -RUN ls -RUN ls Budet-cho-bot RUN dotnet restore "Budet-cho-bot/Budet-cho-bot.fsproj" -RUN dotnet publish "Budet-cho-bot/Budet-cho-bot.fsproj" -c Production -o /app/publish +COPY . . +WORKDIR "/src/Budet-cho-bot" +RUN dotnet build "Budet-cho-bot.fsproj" -c Release -o /app/publish -FROM mcr.microsoft.com/dotnet/aspnet:7.0 as final +FROM build AS publish +RUN dotnet publish "Budet-cho-bot.fsproj" -c Release -o /app/publish /p:UseAppHost=false + +FROM base as final WORKDIR /app -COPY --from=build /app/publish . +COPY --from=publish /app/publish . ENTRYPOINT ["dotnet", "Budet-cho-bot.dll", "--environment=Development"]