Mise à jour de 'WF_EF_Api/WfApi/Dockerfile'
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
parent
24be82306c
commit
e9f08492b8
@ -1,25 +1,25 @@
|
|||||||
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
|
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
|
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
|
||||||
USER app
|
USER app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
EXPOSE 8081
|
EXPOSE 8081
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
||||||
ARG BUILD_CONFIGURATION=Release
|
ARG BUILD_CONFIGURATION=Release
|
||||||
WORKDIR /src
|
WORKDIR /WF-PmAPI/WF_EF_Api
|
||||||
COPY ["WfApi/WfApi.csproj", "WfApi/"]
|
COPY ["WfApi/WfApi.csproj", "WfApi/"]
|
||||||
RUN dotnet restore "./WfApi/WfApi.csproj"
|
RUN dotnet restore "./WfApi/WfApi.csproj"
|
||||||
COPY . .
|
COPY . .
|
||||||
WORKDIR "/src/WfApi"
|
WORKDIR "/WF-PmAPI/WF_EF_Api/WfApi"
|
||||||
RUN dotnet build "./WfApi.csproj" -c $BUILD_CONFIGURATION -o /app/build
|
RUN dotnet build "./WfApi.csproj" -c $BUILD_CONFIGURATION -o /app/build
|
||||||
|
|
||||||
FROM build AS publish
|
FROM build AS publish
|
||||||
ARG BUILD_CONFIGURATION=Release
|
ARG BUILD_CONFIGURATION=Release
|
||||||
RUN dotnet publish "./WfApi.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
|
RUN dotnet publish "./WfApi.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
|
||||||
|
|
||||||
FROM base AS final
|
FROM base AS final
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=publish /app/publish .
|
COPY --from=publish /app/publish .
|
||||||
ENTRYPOINT ["dotnet", "WfApi.dll"]
|
ENTRYPOINT ["dotnet", "WfApi.dll"]
|
Loading…
Reference in new issue