floormind
floormind

Reputation: 2028

How do i solve the error "No such file or directory" error when building with Dockerfile

I have a dockerfile in my .net core project directory, I published my project into an out directory within my project directory, the out folder has all my dlls, but when i try to run the command docker build -t floormindcore.web . I get this error

stat /var/lib/docker/tmp/docker-builder154411130/out: no such file or directory

This is my Dockerfile below

enter image description here

Folder structure of project

The out directory is in the project directory on my linux server, and so is my Dockerfile, and this is where i run the docker build command from. The out directory contains my published dlls

enter image description here

Upvotes: 1

Views: 1907

Answers (1)

floormind
floormind

Reputation: 2028

So the issue is because there is a .dockerignore file in here which has "*" in it... this was probably added when i created the docker support through visual studio, so i just renamed the file and it seems to build successfully now.

Upvotes: 2

Related Questions