There is a problem with using Docker to deploy ASP. NET core in Ubuntu today, when the Docker build is always the last hint
Lstat obj/docker/publish:no such file or directory.
And when performing Docker images to view the image, the repository and tag of the generated image are all <none>.
Prompt when performing Docker run
Unable to find image ' crm:latest ' locally
Lenovo to build when the last hint of the obj/docker/publish is supposed to be the problem of this piece. View Dockerfile, which reads as follows
From Microsoft/aspnetcore:2.0/COPY ${source:-obj/docker/ Publish}. entrypoint ["dotnet""crm.dll"]
Because this file vs2017 automatically generated, so usually also did not notice, there is a copy inside, the contents of the same as the error, after checking to know when the dockerfile from the build Docker mirror, You can choose between two commands to add a local directory or file to your image: Add and copy. These two instruction formats are basically the same and basically the same thing
ADD <src>, ... <dest><src> ... <dest>
In both cases, the directory or file (<src>) is copied and added to the container's file system in the specified path (<dest>)
Copy does not support URLs, nor does it specifically treat compressed files. If the build does not specify decompression in the file, then it will not be extracted automatically, only the compressed files will be copied into the container.
Because I build it in the directory containing the Dockerfile file, just change the-obj/docker/publish in the file to-/
Copy in the Dockerfile file in ASP.