I'm looking at this tutorial: https://learn.microsoft.com/en-us/learn/modules/implement-docker-multi-stage-builds/3-examine-multi-stage-dockerfiles
And this part confuses me:
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build
WORKDIR /src
COPY ["WebApplication1.csproj", ""]
RUN dotnet restore "./WebApplication1.csproj"
COPY . .
WORKDIR "/src/."
RUN dotnet build "WebApplication1.csproj" -c Release -o /app/build
Why would you use WORKDIR twice here? Aren't we already in the src
?
Does the dot at the end (/src/.
) has any additional meaning?