why podman compose isn't supporting `include` top-level-element?

92 views Asked by At

I am learning podman and trying to split my existing docker-compose file into multiple docker-compose files like:

Before splitting:

before-split-docker-compose.yaml:

version: '3.8'

services:
  hello:
    image: docker/whalesay
    command: cowsay hello
  
  world:
    image: docker/whalesay
    command: cowsay world

  

After splitting:

docker-compose.yaml:

version: '3.8'

# https://docs.docker.com/compose/multiple-compose-files/include/
include:
  - docker-compose2.yaml

services:
  hello:
    image: docker/whalesay
    command: cowsay hello

docker-compose2.yaml:

version: '3.8'

services:
  world:
    image: docker/whalesay
    command: cowsay world

when I executed docker compose up, it is only spinning up container hello as given below:

[kunalsharma@fedora learnDockerCompose]$ docker compose up
>>>> Executing external compose provider "/usr/bin/podman-compose". Please refer to the documentation for details. <<<<

podman-compose version: 1.0.6
['podman', '--version', '']
using podman version: 4.9.0
** excluding:  set()
['podman', 'ps', '--filter', 'label=io.podman.compose.project=learndockercompose', '-a', '--format', '{{ index .Labels "io.podman.compose.config-hash"}}']
recreating: ...
** excluding:  set()
podman stop -t 10 learndockercompose_hello_1
learndockercompose_hello_1
exit code: 0
podman rm learndockercompose_hello_1
learndockercompose_hello_1
exit code: 0
recreating: done


['podman', 'network', 'exists', 'learndockercompose_default']
podman create --name=learndockercompose_hello_1 --label io.podman.compose.config-hash=32a8d5a4bf8bb2dbcdaf44bb23d405f4133077512c07d299359e101136f3bca2 --label io.podman.compose.project=learndockercompose --label io.podman.compose.version=1.0.6 --label [email protected] --label com.docker.compose.project=learndockercompose --label com.docker.compose.project.working_dir=/home/kunalsharma/Documents/programming/docker/learnDockerCompose --label com.docker.compose.project.config_files=docker-compose.yaml --label com.docker.compose.container-number=1 --label com.docker.compose.service=hello --net learndockercompose_default --network-alias hello docker/whalesay cowsay hello
e7c1c01295ceb99b25e84d571734eb84a41a686894c34c1aaf3d62796f22cf16
exit code: 0
podman start -a learndockercompose_hello_1
[hello] |  _______ 
[hello] | < hello >
[hello] |  ------- 
[hello] |     \
[hello] |      \
[hello] |       \     
[hello] |                     ##        .            
[hello] |               ## ## ##       ==            
[hello] |            ## ## ## ##      ===            
[hello] |        /""""""""""""""""___/ ===        
[hello] |   ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~   
[hello] |        \______ o          __/            
[hello] |         \    \        __/             
[hello] |           \____\______/   
exit code: 0
[kunalsharma@fedora learnDockerCompose]$

I tried searching on internet but didn't found anything related.

I am using Fedora 39 with podman version 4.9.0 and podman-compose version: 1.0.6. am I missing something?

0

There are 0 answers