Description
Describe the bug
Looking at compose spec (which docker-compose
conforms with here), this should be valid:
include:
- path: ../commons/compose.yaml
project_directory: ..
env_file: ../another/.env
- path: composefiles/compose2.yaml
project_directory: ./project2
env_file: ./envfiles/project2
Yet, this causes a runtime error at
podman-compose/podman_compose.py
Line 1835 in daab93b
AttributeError: 'dict' object has no attribute 'strip'
Looking at the implementation, only the "short syntax" is supported and attempting use of the long syntax causes a crash.
This also means that it's not possible to make use of project_directory
or env_file
for includes.
Looking at the current implementation, it also seems that even if this is addressed, it would still not properly merge multiple entries in env_file
unless the handling of env files is reworked.
Additional context
Going back in history, this was always part of the include
spec, so podman-compose does not implement an older version here - it's simply incorrect/incomplete?
Related:
- Implement
include
fromcompose-spec
#726 - Wrongly relative path by include #947
- Support multiple file includes and include cycles in include section #804
- New release request featuring "include" from compose-spec #759
- Multiple env files as arguments or environment variable #813
- env_file ignored for environment #891
- Environment handling needs integration tests #970