Skip to content

Commit

Permalink
run restore then change workdir
Browse files Browse the repository at this point in the history
  • Loading branch information
Joefficial committed May 16, 2021
1 parent 0fc6f07 commit c797307
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions RestApiExample/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ EXPOSE 80
EXPOSE 443

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

FROM base AS final
Expand Down

0 comments on commit c797307

Please sign in to comment.