1
0

try fix docker build
Some checks failed
continuous-integration/drone/pr Build is failing

This commit is contained in:
ledocool 2023-07-28 21:02:06 +07:00
parent 0c0e788966
commit 1afcda905c

View File

@ -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"]