Prefer 'compose.yaml' as per compose spec

https://github.com/compose-spec/compose-spec/blob/master/spec.md#compose-file
This commit is contained in:
Daniel Helgenberger 2021-05-05 12:24:22 +02:00 committed by Muayyad Alsadi
parent 226ac4fb3a
commit 080b8a369e

View File

@ -837,6 +837,10 @@ class PodmanCompose:
cmd = args.command
if not args.file:
args.file = list(filter(os.path.exists, [
"compose.yaml",
"compose.yml",
"compose.override.yaml",
"compose.override.yml",
"docker-compose.yml",
"docker-compose.yaml",
"docker-compose.override.yml",
@ -848,7 +852,7 @@ class PodmanCompose:
]))
files = args.file
if not files:
print("no docker-compose.yml or container-compose.yml file found, pass files with -f")
print("no compose.yaml, docker-compose.yml ot container-compose.yml file found, pass files with -f")
exit(-1)
ex = map(os.path.exists, files)
missing = [ fn0 for ex0, fn0 in zip(ex, files) if not ex0 ]