podman-compose gets confused with symlinks and extends
I have this repo structure:
Structure:
.
├── project1
│ ├── docker-compose.yml
│ └── Dockerfile
├── project2
│ ├── docker-compose.yml
│ └── Dockerfile
├── metarepo
│ └── docker-compose.yml
└── docker-compose.yml -> ./metarepo/docker-compose.yml
And this main docker-compose.yml:
docker-compose.yml
---
version: '2.4'
services:
project1:
extends:
file: project1/docker-compose.yml
service: project1
project2:
extends:
file: project2/docker-compose.yml
service: project2
...
A project-docker-compose.yml looks like this;
docker-compose.yml
---
version: "2.4"
services:
project1:
build: .
...
While this works with docker-compose, podman-compose gets confused. AFAIK there are multiple issues:
-
podman-composeusesos.path.realpathinstead ofos.path.abspathin the line below to resolve the directory of the maindocker-compose.yml. Thuspodman-composeoperates inmetarepo/directory instead of the main directory. https://github.com/containers/podman-compose/blob/efcbc75f631e693791a7f71abc49d9d05559ae92/podman_compose.py#L791 -
podman-composedoes not resolve the build path toproject1//project2/. I think theextendslogic is broken...
I am also having this issue when trying to move a project from docker to podman. I received error messages described in #268.
podman-compose uses os.path.realpath instead of os.path.abspath
please send me PR and I'll merge it.
Hey @muayyad-alsadi
I have created a PR for this issue. Can you please have a look at it?
Thanks a lot.
although I've some comments, I'll merge it now and comment later when I get time.
I'll keep this open so that you check again when I'm done.
When this fix will be released?
@filipef9 help us test latest push