docker-compose ERROR: .FileNotFoundError: [Errno 2] No such file or directory:
Solution 1
In my case, I forgot to start Docker itself.
So, check if you've started the Docker application before executing docker-compose.
Solution 2
The file is probably not there.
One way to make sure the tool is not to blame, is to use another basic command like cat
.
$ cat ./config/somefile.yml
cat: ./config/somefile.yml: No such file or directory
Related videos on Youtube
Umair
Updated on September 26, 2022Comments
-
Umair almost 2 years
So when i run the command,
docker-compose -f config/somefile.yml up -d
I get the following error: ERROR: .FileNotFoundError: [Errno 2] No such file or directory: ./config/somefile.yml
I tried giving the full path to the yml file, but the error is the same.
However, when i create a dulicate file with the name docker-compose.yml (by using, script: cp somefile.yml docker-compose.yml) and then i run
docker-compose up
It runs fine. It just cannot run any other file than the default one. Ive searched a lot of places and could not find any solution. Any help will be greatly appreciated. Thanks
Docker-compose: 1.22 O.S: Ubuntu 14.4
-
Atif Ali about 2 yearsI see the file with
cat
but not withdocker-compose