Обновление docker под Playwright
All checks were successful
Create and publish a Docker image / Publish image (push) Successful in 4m53s
All checks were successful
Create and publish a Docker image / Publish image (push) Successful in 4m53s
This commit is contained in:
@@ -1,22 +1,24 @@
|
|||||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0-alpine3.22 AS base
|
|
||||||
USER $APP_UID
|
|
||||||
WORKDIR /app
|
|
||||||
EXPOSE 8080
|
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/sdk:9.0-alpine3.22 AS build
|
FROM mcr.microsoft.com/dotnet/sdk:9.0-alpine3.22 AS build
|
||||||
ARG BUILD_CONFIGURATION=Release
|
ARG BUILD_CONFIGURATION=Release
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
COPY ["SfeduSchedule.csproj", "SfeduSchedule.csproj"]
|
|
||||||
RUN dotnet restore "SfeduSchedule.csproj"
|
|
||||||
COPY . .
|
COPY . .
|
||||||
WORKDIR "/src"
|
RUN dotnet restore "SfeduSchedule.csproj"
|
||||||
RUN dotnet build "SfeduSchedule.csproj" -c $BUILD_CONFIGURATION -o /app/build
|
|
||||||
|
|
||||||
FROM build AS publish
|
|
||||||
ARG BUILD_CONFIGURATION=Release
|
|
||||||
RUN dotnet publish "SfeduSchedule.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
|
RUN dotnet publish "SfeduSchedule.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
|
||||||
|
|
||||||
FROM base AS final
|
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS final
|
||||||
|
EXPOSE 8080
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=publish /app/publish .
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y --no-install-recommends wget && \
|
||||||
|
wget -q https://github.com/PowerShell/PowerShell/releases/download/v7.5.2/powershell_7.5.2-1.deb_amd64.deb && \
|
||||||
|
apt-get install -y ./powershell_7.5.2-1.deb_amd64.deb && \
|
||||||
|
rm -f powershell_7.5.2-1.deb_amd64.deb && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
|
||||||
|
|
||||||
|
COPY --from=build /app/publish .
|
||||||
|
RUN pwsh ./playwright.ps1 install --with-deps chromium
|
||||||
|
|
||||||
ENTRYPOINT ["dotnet", "SfeduSchedule.dll"]
|
ENTRYPOINT ["dotnet", "SfeduSchedule.dll"]
|
@@ -13,5 +13,10 @@ services:
|
|||||||
- MS_USERNAME=${MS_USERNAME}
|
- MS_USERNAME=${MS_USERNAME}
|
||||||
- MS_PASSWORD=${MS_PASSWORD}
|
- MS_PASSWORD=${MS_PASSWORD}
|
||||||
# - TOKEN=
|
# - TOKEN=
|
||||||
|
volumes:
|
||||||
|
- data:/app/data
|
||||||
restart: always
|
restart: always
|
||||||
image: git.zetcraft.ru/serega404/sfeduschedule:main
|
image: git.zetcraft.ru/serega404/sfeduschedule:main
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
data:
|
@@ -13,6 +13,8 @@ services:
|
|||||||
- MS_USERNAME=
|
- MS_USERNAME=
|
||||||
- MS_PASSWORD=
|
- MS_PASSWORD=
|
||||||
# - TOKEN=
|
# - TOKEN=
|
||||||
|
volumes:
|
||||||
|
- ./data:/app/data
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
build:
|
build:
|
||||||
context: ./SfeduSchedule
|
context: ./SfeduSchedule
|
||||||
|
Reference in New Issue
Block a user