Files
Otchislator/src/Otchinslator/Dockerfile
Sergey Karmanov bb2c2328f5
All checks were successful
Build and deploy / Publish image (push) Successful in 3m33s
Бамп версии до 9 и добавил выбор института
2025-01-21 02:13:29 +03:00

29 lines
1023 B
Docker

FROM mcr.microsoft.com/dotnet/aspnet:9.0.1-alpine3.21 AS base
USER root
RUN apk update && apk add --no-cache curl icu tzdata musl-locales musl-locales-lang
USER $APP_UID
WORKDIR /app
EXPOSE 8080
FROM mcr.microsoft.com/dotnet/sdk:9.0.102 AS build
ARG BUILD_CONFIGURATION=Release
RUN apt update && apt install npm -y
WORKDIR /src
COPY ["Otchinslator.csproj", "Otchinslator.csproj"]
RUN dotnet restore "Otchinslator.csproj"
COPY . .
WORKDIR "/src"
RUN npm ci
RUN npx tailwindcss -i ./wwwroot/css/site.css -o ./wwwroot/css/styles.css --minify
RUN dotnet build "Otchinslator.csproj" -c $BUILD_CONFIGURATION -o /app/build
FROM build AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "Otchinslator.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
# HEALTHCHECK --interval=5s --timeout=10s --retries=3 CMD curl --fail http://localhost:8000/health || exit 1
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Otchinslator.dll"]