Base commit
This commit is contained in:
21
TelegramBot/Dockerfile
Normal file
21
TelegramBot/Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
|
||||
USER $APP_UID
|
||||
WORKDIR /app
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
||||
ARG BUILD_CONFIGURATION=Release
|
||||
WORKDIR /src
|
||||
COPY ["TelegramBot/TelegramBot.csproj", "TelegramBot/"]
|
||||
RUN dotnet restore "TelegramBot/TelegramBot.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/TelegramBot"
|
||||
RUN dotnet build "TelegramBot.csproj" -c $BUILD_CONFIGURATION -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
ARG BUILD_CONFIGURATION=Release
|
||||
RUN dotnet publish "TelegramBot.csproj" -c $BUILD_CONFIGURATION -o /app/publish
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
ENTRYPOINT ["dotnet", "TelegramBot.dll"]
|
||||
Reference in New Issue
Block a user