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 found
However, there were no problem found when executing the following
docker compose up
and 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: https://index.docker.io/v1/
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 support
UPDATED
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
7
Answers
execute docker-compose command where docker-compose.yml file located at should resolved it.
or specify the docker-compose.yml file as bellow
as suggested
I was facing the same issue on Windows
PowerShell
. I was using the docker-compose up command from within the newly created directory located inC:WINDOWSsystem32
.In my case, I rectified the problem by moving it to
C:Users
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!
For anyone who’s getting
I was getting the same message on Mac trying to execute
The 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.
Faced the same issue on a Windows PC. The problem was with the extension of the file being assumed by the OS as a known file type.
Solution
Go to Folder options and disable the
Hide extensions for known file types
.You should be able to see the actual file extension which may looked like proper .txt files now (instead of
.yml
). Rename the file(s) accordingly, run the command again and viola!Create the following
docker-compose.yaml
file in an empty directory of your choiceI was getting the similar error on windows 10 and corrected the same by saving my .yaml file again with type as "All files" and extension as .yaml. Before this windows was saving it as text file due to which it was giving error.