docker - 如何使用自定义文件名运行 docker-compose
问题描述
我有这个文件:docker-compose.test.yml
但是当我尝试运行时docker-compose
,会发生这种情况:
$ docker-compose up
ERROR:
Can't find a suitable configuration file in this directory or any
parent. Are you in the right directory?
Supported filenames: docker-compose.yml, docker-compose.yaml
是否有一些选项可以指定要使用的文件?
解决方案
使用-f
选项指定文件名。
例子:
docker-compose -f docker-compose.test.yml up
推荐阅读
- c# - 如果它是最后一个元素,如何替换json文件的值?
- amazon-web-services - 将新的 AWS EBS 卷添加到同一 AZ 中的 ASG
- c# - C# 中是否还有另一个“is”运算符?
- python - ValueError 在 Keras 中构建具有 2 个输出的神经网络
- android-studio - 为什么即使我已经清楚地使用它,android studio 也会对未使用的变量发出警告
- timeout - stm32 usart 接收超时
- javascript - 函数将字符串参数转换为数字javascript
- webrtc - 尝试创建仅发送 WebRTC 管道时出错
- flutter - getkey() 在调试模式下工作,但在颤振中不在发布模式下工作
- sql - 从包含 CSV 的 VARCHAR 中选择具有新 DISTINCT 的行