Skip to content

Commit

Permalink
ci: Ensure API Dockerfile can be built from repository root
Browse files Browse the repository at this point in the history
  • Loading branch information
vyruz1986 authored Nov 10, 2023
1 parent b34d0fb commit 3fc4ca4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions API/DoorRequest.API/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@ EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["DoorRequest.API.csproj","."]
RUN dotnet restore "DoorRequest.API.csproj"
COPY . .
RUN dotnet build "DoorRequest.API.csproj" -c Release -o /app/build
RUN dotnet restore "API/DoorRequest.API/DoorRequest.API.csproj"
RUN dotnet build "API/DoorRequest.API/DoorRequest.API.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "DoorRequest.API.csproj" -c Release -o /app/publish
RUN dotnet publish "API/DoorRequest.API/DoorRequest.API.csproj" -c Release -o /app/publish

FROM base AS final
RUN mkdir /logging
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "DoorRequest.API.dll"]
ENTRYPOINT ["dotnet", "DoorRequest.API.dll"]

0 comments on commit 3fc4ca4

Please sign in to comment.