In my ubuntu 22.04 with a docker compose version v2.17.2, when I try to execute the command docker compose up I receive this error:
XXXX@ubuntu:/develop/composetest$ docker compose up
no configuration file provided: not found
I’m in a folder with a compose.yaml file:
version: "3"
services:
web:
build: .
ports:
- "8000:5000"
redis:
image: "redis:alpine"
If can help, I try whith this command:
docker compose -f compose.yaml up
And result is:
stat /var/lib/snapd/void/compose.yaml: no such file or directory
How can I solve it?
thanks
2
Answers
The default name of configuration yaml for docker compose is
docker-compose.yml
. You can renamecompose.yaml
todocker-compose.yml
and rundocker compose up
directly.If you want to use another file name:
.yml
instead of.yaml
docker compose -f ./compose.yml up
I am also having this issue. I’m trying to create HomeAssistant. My files exist & are spelled correctly.
avp@minion-1:/opt$ docker compose version
Docker Compose version v2.20.3
avp@minion-1:/opt$ cd homeassistant/
avp@minion-1:/opt/homeassistant$ ls -l
total 12
-rw-r–r– 1 root root 324 Mar 3 18:19 compose.yml
drwxr-xr-x 2 root root 4096 Mar 3 18:00 config
-rw-r–r– 1 root root 324 Mar 3 18:14 docker-compose.yml
avp@minion-1:/opt/homeassistant$ sudo docker compose up -d
no configuration file provided: not found
Thanks in advance.