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.
23 lines
666 B
23 lines
666 B
# Étape 1 : Build de l'application
|
|
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
|
WORKDIR /src
|
|
|
|
# Copier les fichiers de projet et restaurer les dépendances
|
|
COPY WF-WebAdmin/WF-WebAdmin/WF-WebAdmin.csproj ./WF-WebAdmin/WF-WebAdmin/
|
|
RUN dotnet restore ./WF-WebAdmin/WF-WebAdmin/WF-WebAdmin.csproj
|
|
|
|
# Copier tout le reste et publier
|
|
COPY . .
|
|
RUN dotnet publish ./WF-WebAdmin/WF-WebAdmin/WF-WebAdmin.csproj -c Release -o /app
|
|
|
|
# Étape 2 : Image runtime
|
|
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS runtime
|
|
WORKDIR /app
|
|
COPY --from=build /app .
|
|
|
|
# Exposer le port utilisé par l'application
|
|
EXPOSE 5000
|
|
|
|
# Lancer l'application
|
|
ENTRYPOINT ["dotnet", "WF-WebAdmin.dll"]
|