Allow setting an argument list as x-podman.pod_args to override the
default value `--infra=false --share=`. `--pod-args` passed on the command
line takes precedence over the value set in docker-compose.yml; the values
are not merged.
Fixes#1057.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
podman-compose v1.0.6 is the last to support Python3.6. When newer
podman-compose version is used with too old Python, podman-compose gives
only a confusing error. This commit gives a clear message to use
upgraded Python version.
A descriptive error can not be thrown, as line "from __future__ imports"
must occur at the beginning of the file, but older Python (older than
Python3.7) does not recognize __future__ and throws an error
immediately.
Therefore, a comment is used to inform the user to update his Python
version.
Signed-off-by: Monika Kairaityte <monika@kibit.lt>
This patch add 'x-podman.dns' option to the 'network' configuration,
allowing users to set the DNS resolvers for a defined network.
Signed-off-by: Rafael Guterres Jeffman <rjeffman@redhat.com>
Podman allows to create a network disabling the DNS plugin with
'--disable-dns', but this option is not available in the compose spec.
This patch add 'x-podman.disable-dns' to the podman-compose options,
allowing the creation of a network with the DNS plugin disabled.
Signed-off-by: Rafael Guterres Jeffman <rjeffman@redhat.com>
Also modifies an existing integration test to expect an empty string as `docker-compose` warns that
`ZZVAR3` is not set and defaults it to an empty string per the acutal output here.
```yaml
$ docker-compose -f container-compose.load-.env-in-project.yaml config
WARN[0000] The "ZZVAR3" variable is not set. Defaulting to a blank string.
name: project
services:
app:
command:
- /bin/busybox
- sh
- -c
- env | grep ZZ
environment:
ZZVAR1: This value is loaded but should be overwritten
ZZVAR2: This value is loaded from .env in project/ directory
ZZVAR3: ""
...
```
Signed-off-by: indra <indra.talip@gmail.com>
When using bridge mode, podman-compose will use the default `podman` network.
We do not need to create this network, so just return as other network_mode.
Signed-off-by: Songmin Li <lisongmin@protonmail.com>
The behavior has not changed, single-network has a special case.
Modified-by: Povilas Kanapickas <povilas@radix.lt>
Signed-off-by: Songmin Li <lisongmin@protonmail.com>
Note that multiple_nets is now guaranteed to be not empty in processing
stage.
Modified-by: Povilas Kanapickas <povilas@radix.lt>
Signed-off-by: Songmin Li <lisongmin@protonmail.com>
This commit takes into account that network_mode won't have networks
attribute set, accordingly get_net_args_from_network_mode() can
calculate complete net_args easily.
Modified-by: Povilas Kanapickas <povilas@radix.lt>
Signed-off-by: Songmin Li <lisongmin@protonmail.com>
"device_cgroup_rules: []" is defined in the Compose file specification,
and corresponds to "podman run --device-cgroup-rule="
Signed-off-by: Jeremy Visser <jeremy@visser.name>