This is not present in the compose spec. However, netavark podman
network backend does support --route option, which is useful for various
kinds of things. It is very easy to expose it.
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
Failure exit code for `push` command is not currently forwarded as exit
code for podman-compose.
With this PR, podman-compose stops pushing when the underlying podman
command fails and forwards its exit code.
Signed-off-by: Monika Kairaityte <monika@kibit.lt>
`podman-compose` currently does not support interpolating environment
variables in dictionary keys, despite the compose file specification
indicating this capability.
See the relevant compose-spec documentation:
https://github.com/compose-spec/compose-spec/blob/main/12-interpolation.md
This feature is useful in `labels` or `environment` sections, where keys
can be user-defined strings. To enable interpolation, an alternate equal
sign syntax must be used, e.g.:
services:
foo:
labels:
- "$VAR_NAME=label_value"
After this PR `podman-compose` will align more closely with the compose
file specification, allowing for the interpolation of environment
variables in dictionary keys.
Signed-off-by: Monika Kairaityte <monika@kibit.lt>
When running "podman-compose", the list of commands gets displayed.
The "systemd" command is an outlier, showing multiple lines, unintended
at this location.
This change moves the longer command description to its proper place,
that is, it gets shown when "podman-compose systemd --help" is
executed.
Signed-off-by: Cleber Rosa <crosa@redhat.com
Signed-off-by: Monika Kairaityte <monika@kibit.lt>
This commit allows compose file to directly use environment variable
values in "environment:" section when variables were set in `.env` file.
This functionality was missing, as docker-compose supports both: short
and variable interpolation syntax forms:
environment:
- FOO
and
environment:
- FOO=${FOO}
Relevant docker-compose documentation:
https://docs.docker.com/compose/how-tos/environment-variables/set-environment-variables/
podman-compose is more compatible with docker-compose after this change.
Signed-off-by: Monika Kairaityte <monika@kibit.lt>
After changes in 92f0a8583a, the
dockerfile parameter is igored if the (local) work directory's name ends
in `.git`.
This commit fixes the regression and adds more tests.
Signed-off-by: Monika Kairaityte <monika@kibit.lt>
e03d675b9b broke relative host path
resolution by deleting os.chdir(). After this commit current working
directory is not relevant anymore.
Fixes e03d675b9b.
Signed-off-by: Monika Kairaityte <monika@kibit.lt>
Current error message does not provide the exact path where the
Dockerfile is being searched.
This commit distinguishes two types of errors when Dockerfile is not
found in build context:
- when the context does not have provided custom-named Dockerfile, the
path in the error message is absolute: "OSError: Dockerfile not found in
.../podman-compose/tests/integration/build_fail/context_no_file/custom-named-Dockerfile"
- when the context does not have any Dockerfile, the path in the error
message is: "OSError: Dockerfile not found in
.../podman-compose/tests/integration/build_fail/context_no_file"
Only this error message was used before the fix.
Signed-off-by: Monika Kairaityte <monika@kibit.lt>
Co-authored-by: Siteshwar Vashisht <svashisht@redhat.com>
Skip dependency health check to avoid compose-up hang for podman prior
to 4.6.0, which doesn't support --condition healthy.
Signed-off-by: Justin Zhang <schnell18@gmail.com>
Use `podman inspect` to get the actual host ports rather echoing the
defined ports from the compose yml.
Fixes#778 and #1039
Signed-off-by: Frank Stettner <frank-stettner@gmx.net>