I had setup docker desktop with windows WSL integration version 2 and I run into issue when execute certain docker compose command with following errors
docker compose logs
no configuration file provided: not foundHowever, there were no problem found when executing the following
docker compose upand image built and fired up successfully.
Is there anyone can help on this?
docker info
Client: Context: default Debug Mode: false Plugins: buildx: Docker Buildx (Docker Inc., v0.7.1) compose: Docker Compose (Docker Inc., v2.2.1) scan: Docker Scan (Docker Inc., 0.9.0)
Server: Containers: 3 Running: 3 Paused: 0 Stopped: 0 Images: 4 Server Version: 20.10.11 Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Native Overlay Diff: true userxattr: false Logging Driver: json-file Cgroup Driver: cgroupfs Cgroup Version: 1 Plugins: Volume: local Network: bridge host ipvlan macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog Swarm: inactive Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc Default Runtime: runc Init Binary: docker-init containerd version: 7b11cfaabd73bb80907dd23182b9347b4245eb5d runc version: v1.0.2-0-g52b36a2 init version: de40ad0 Security Options: seccomp Profile: default Kernel Version: 5.10.60.1-microsoft-standard-WSL2 Operating System: Docker Desktop OSType: linux Architecture: x86_64 CPUs: 8 Total Memory: 24.95GiB Name: docker-desktop ID: FUMA:ZOXR:BA4L:YSOZ:4NQT:HHIZ:ASAD:EJGA:NJRG:SO4S:GXN3:JG5H Docker Root Dir: /var/lib/docker Debug Mode: false Registry: Labels: Experimental: false Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false
WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device supportUPDATED
It was my mistake that I should execute the docker compose command under the correct directory where docker-compose.yml file located at.
The issue resolved
24 Answers
execute docker-compose command where docker-compose.yml file located at should resolved it.
or specify the docker-compose.yml file as bellow
docker-compose -f <docker-compose.yml> logs as suggested
1I was facing the same issue on Windows PowerShell . I was using the docker-compose up command from within the newly created directory located in C:\WINDOWS\system32\ .
In my case, I rectified the problem by moving it to C:\Users\
For anyone who's getting
no configuration file provided: not foundI was getting the same message on Mac trying to execute
docker-compose upThe problem was with docker-compose.yml file. I saved it from Visual Studio Code as a text file though OS determined it like a proper YAML file. Look at the screenshot: left file is wrong but seems the same.
Make sure you select YAML format when you saving it.
I was also receiving this error and I had mis-spelt the file name(oops), so also double check spelling of files if anyone else finds their way to this post!