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.
39 lines
925 B
39 lines
925 B
# FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
|
# WORKDIR /src
|
|
# COPY . .
|
|
|
|
# ARG BUILD_CONFIGURATION=Release
|
|
# RUN dotnet publish "HeartTrack.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
|
|
|
|
# FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
|
|
# USER $APP_UID
|
|
# WORKDIR /app
|
|
|
|
# COPY --from=build /app/publish .
|
|
|
|
# EXPOSE 8080
|
|
# EXPOSE 8081
|
|
|
|
# ENTRYPOINT ["dotnet", "HeartTrack.dll"]
|
|
|
|
# Utiliser l'image SDK .NET pour construire l'application
|
|
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
|
WORKDIR /app
|
|
|
|
# Copier les fichiers du projet et restaurer les dépendances
|
|
COPY *.csproj .
|
|
RUN dotnet restore
|
|
|
|
# Copier tout le reste et construire l'application
|
|
COPY . .
|
|
RUN dotnet publish -c Release -o out
|
|
|
|
# Utiliser l'image runtime .NET pour exécuter l'application
|
|
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS runtime
|
|
WORKDIR /app
|
|
COPY --from=build /app/out .
|
|
|
|
EXPOSE 80
|
|
|
|
ENTRYPOINT ["dotnet", "HeartTrack.dll"]
|