Ajout du bon chemin pour la commande dotnet et suppression du build
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
parent
0c8003c4a3
commit
3008b02f44
@ -1,21 +1,16 @@
|
|||||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
||||||
WORKDIR /src
|
WORKDIR /app
|
||||||
COPY API_SQLuedo/ ./
|
COPY API_SQLuedo/ ./
|
||||||
|
|
||||||
# Restore dependencies
|
# Restore dependencies
|
||||||
RUN dotnet restore API/API.csproj
|
RUN dotnet restore API/API.csproj
|
||||||
|
|
||||||
# Build the application
|
|
||||||
RUN dotnet build API/API.csproj -c Release -o /app/build
|
|
||||||
|
|
||||||
# Publish the application
|
# Publish the application
|
||||||
FROM build AS publish
|
|
||||||
RUN dotnet publish API/API.csproj -c Release -o /app/publish
|
RUN dotnet publish API/API.csproj -c Release -o /app/publish
|
||||||
|
|
||||||
|
|
||||||
# Final image
|
# Final image
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
|
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
|
||||||
WORKDIR /api
|
WORKDIR /app
|
||||||
EXPOSE 5000
|
COPY --from=build /app/publish .
|
||||||
COPY --from=publish /app/publish .
|
|
||||||
ENTRYPOINT ["dotnet", "./API.dll"]
|
ENTRYPOINT ["dotnet", "./API.dll"]
|
||||||
|
Loading…
Reference in new issue