You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
777 B
28 lines
777 B
# 1. Étape de build (SDK .NET 6)
|
|
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
|
WORKDIR /src
|
|
|
|
# Copier le csproj et restaurer les dépendances
|
|
COPY WF-WebAdmin/WF-WebAdmin/WF-WebAdmin.csproj ./
|
|
RUN dotnet restore WF-WebAdmin.csproj
|
|
|
|
# Copier le reste du code et compiler
|
|
COPY WF-WebAdmin/WF-WebAdmin/ ./
|
|
RUN dotnet publish WF-WebAdmin.csproj -c Release -o /app/publish
|
|
|
|
# 2. Étape finale (runtime .NET 6)
|
|
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS final
|
|
WORKDIR /app
|
|
|
|
# Désactiver le rechargement de config pour éviter les erreurs inotify
|
|
ENV ASPNETCORE_HOSTBUILDER__RELOADCONFIGONCHANGE=false
|
|
|
|
# Copier les binaires publiés
|
|
COPY --from=build /app/publish ./
|
|
|
|
# Exposer le port HTTP (80) ; adapte si besoin
|
|
EXPOSE 80
|
|
|
|
# Lancement
|
|
ENTRYPOINT ["dotnet", "WF-WebAdmin.dll"]
|