问题描述
docker-compose.yml
文件的命名约定是什么?它应该总是这样命名还是我可以随意将其重命名为例如 docker-compose-jenkins.yml
?
What is the naming convention for the docker-compose.yml
file? Should it always be named like this or am I free to rename it to, for instance, docker-compose-jenkins.yml
?
推荐答案
默认名称:
请注意, docker-compose.yml
是默认名称,因此,如果您要使用 docker-compose up
而未指定文件名,您将需要使用该格式.如前所述,您可以使用多个文件作为替代文件(请参阅 docs ),文件 per -f
参数.
default name:
Note that docker-compose.yml
is the default name so if you want to use docker-compose up
without specifying a filename, you will need to use that format. As mentioned, you can use multiple files as overrides (see docs), by specifying one file per -f
argument.
应用了docker-compose.override.yml文件中的配置除了docker-compose.yml文件中的值之外.
The configuration in the docker-compose.override.yml file is appliedover and in addition to the values in the docker-compose.yml file.
这篇关于docker-compose.yml文件命名约定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!