I am trying to successfully build/publish a project using a dockerfile. However, for some reason it cannot find the output folder that it should of created. From the other posts, everything looks correct in my docker file.
Dockerfile
FROM mcr.microsoft.com/dotnet/sdk:5.0 as build
WORKDIR /app
COPY . .
RUN dotnet restore
RUN dotnet publish ./ClassLibrary2.csproj -c Release -o out
# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:5.0
WORKDIR /app
COPY --from=build /app/out .
ENTRYPOINT ["dotnet", "ClassLibrary2.dll"]
Directory
Docker Command(ran from the folder where the docker file lies): docker build -f Dockerfile-SignedAssembly -t signed-assembly . Output:
just replace
COPY --from=build /app/out .
byCOPY --from=build /out .
as shown below