containers / podman-compose

a script to run docker-compose.yml using podman
GNU General Public License v2.0
4.85k stars 463 forks source link

Allow providing custom in_pod argument as a global compose file variable #964

Closed mokibit closed 2 weeks ago

mokibit commented 3 weeks ago

Default command line argument in_pod was set to True, but this breaks the compose file for users who want to use --userns argument. This PR sets default in_pod value to None, and later resolves whether to create a pod by checking compose file, as new argument in compose file x-podman is now available (documentation is updated and tests added). Now it is convenient for users to pass custom in_pod value (True or False) as a compose file argument when command line value of in_pod is not provided. This PR solves issues: https://github.com/containers/podman-compose/issues/795, https://github.com/containers/podman-compose/issues/935, https://github.com/containers/podman-compose/issues/673, https://github.com/containers/podman-compose/issues/695, https://github.com/containers/podman-compose/issues/166.

deliciouslytyped commented 2 weeks ago

I forgot how any of this works but shouldn't this be a per-container setting?

p12tic commented 2 weeks ago

I forgot how any of this works but shouldn't this be a per-container setting?

Pod is grouping of containers. At least currently all services in compose file are put in a single pod if this is enabled. Is there use case when some containers are put in a pod and the rest aren't?