Docker: "lstat no such file or directory" error when building image. File is there

Well, stupid me. There was a .dockerignore file with dist in the project folder... Case closed


I had the same issue, but it wasn't the .dockerignore, I forgot to specify the directory to run docker in. In my case that directory was . My full command before was

docker build - < Dockerfile

and after was

docker build . < Dockerfile

I put the directory after the build command used -f to specify the dockerfile

eg:

sudo docker build . -t test:i386 -f mydockerfile

The dot after build is the directory to build from, in this case present dir.

Tags:

Docker