Skip to content

Commit c797307

Browse files
committed
run restore then change workdir
1 parent 0fc6f07 commit c797307

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

RestApiExample/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ EXPOSE 80
66
EXPOSE 443
77

88
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
9-
WORKDIR /src/RestApiExample
10-
COPY ["RestApiExample.csproj", "./"]
11-
RUN dotnet restore "RestApiExample.csproj"
9+
WORKDIR /src
1210
COPY . .
11+
RUN dotnet restore "RestApiExample/RestApiExample.csproj"
12+
WORKDIR /src/RestApiExample
1313
RUN dotnet publish "RestApiExample.csproj" -c Release -o /app/publish
1414

1515
FROM base AS final

0 commit comments

Comments
 (0)