I'm using the following Dockerfile to build an asp.net project using docker containers.
FROM mcr.microsoft.com/dotnet/aspnet:3.1 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:3.1 AS build
WORKDIR /src
COPY . .
WORKDIR "/src/IdentityANSP/"
RUN dotnet build "IdentityANSP.csproj" -c Release -o /app
FROM build AS publish
RUN dotnet publish "IdentityANSP.csproj" -c Release -o /app
FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "IdentityANSP.dll"]
Here, the artifacts of the build will be placed in a new docker image. Instead of that, I want the artifacts to copied to a directory in Docker host machine (localhost). To get that done, how should I change the Dockerfile?
PS: I'm new to Docker as well as stackoverflow. So, please ignore my mistakes in the question. Thanks