本文主要是介绍8-docker-compose命令操作容器报“no configuration file provided: not found”,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1.问题描述
docker-compose命令操作容器时,有时会报出“no configuration file provided: not found”问题
[root@centos79 opt]# docker-compose ps
no configuration file provided: not found
[root@centos79 opt]#
2.解决方案
最常见的原因是没有在docker-compose.yml文件的路径下执行该命令。
docker-compose命令操作容器时需要在yml文件所在路径执行
[root@centos79 opt]# cd /usr/local/harbor/
[root@centos79 harbor]# ls -l
总用量 782740
drwxr-xr-x 3 root root 20 12月 11 20:20 common
-rw-r--r-- 1 root root 3643 11月 1 15:03 common.sh
-rw-r--r-- 1 root root 5836 12月 11 20:20 docker-compose.yml
-rw-r--r-- 1 root root 801456311 11月 1 15:04 harbor.v2.9.1.tar.gz
-rw-r--r-- 1 root root 13763 12月 11 20:16 harbor.yml
-rw-r--r-- 1 root root 13760 11月 1 15:03 harbor.yml.tmpl
-rwxr-xr-x 1 root root 1975 11月 1 15:03 install.sh
-rw-r--r-- 1 root root 11347 11月 1 15:03 LICENSE
-rwxr-xr-x 1 root root 1881 11月 1 15:03 prepare
[root@centos79 h
这篇关于8-docker-compose命令操作容器报“no configuration file provided: not found”的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!