📈 Modif dockerFile
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
parent
afa148c563
commit
f8043a5a10
@ -1,12 +1,30 @@
|
|||||||
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
||||||
WORKDIR /app
|
|
||||||
|
# Première étape de la construction
|
||||||
|
WORKDIR /app/server
|
||||||
RUN dotnet new console
|
RUN dotnet new console
|
||||||
COPY server/Server/Program.cs Program.cs
|
COPY Server/Program.cs Program.cs
|
||||||
RUN dotnet publish -c Release -o out
|
RUN dotnet publish -c Release -o out
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/runtime:6.0
|
# Deuxième étape de la construction
|
||||||
|
WORKDIR /app/api
|
||||||
|
COPY ApiLeapHit/ApiLeapHit.csproj .
|
||||||
|
COPY DTO/DTO.csproj DTO/
|
||||||
|
COPY DataBase/DataBase.csproj DataBase/
|
||||||
|
RUN dotnet restore
|
||||||
|
COPY . .
|
||||||
|
WORKDIR /app/api/ApiLeapHit
|
||||||
|
RUN dotnet build -c Release -o /app/build
|
||||||
|
|
||||||
|
# Troisième étape de la construction
|
||||||
|
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS final
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=build /app/out .
|
COPY --from=build /app/server/out .
|
||||||
ENTRYPOINT ["dotnet", "app.dll"]
|
COPY --from=build /app/api/build .
|
||||||
|
|
||||||
|
# Configuration de l'application
|
||||||
|
EXPOSE 80
|
||||||
|
EXPOSE 443
|
||||||
EXPOSE 3131
|
EXPOSE 3131
|
||||||
|
ENTRYPOINT ["dotnet", "ApiLeapHit.dll"]
|
||||||
|
|
||||||
|
Loading…
Reference in new issue