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>
Fixes#958: missing or incorrect use of --in-pod and pod-args
Fixes#693: --in-pod 'name' no function
Signed-off-by: norbiros <norbiros@protonmail.com>
Signed-off-by: Norbiros <norbiros@protonmail.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>
The COMPOSE_PROJECT_NAME environment variable must override the
top-level name: attribute in the Compose file.
The precedence order is defined in the docker compose documentation
https://docs.docker.com/compose/how-tos/project-name/#set-a-project-name
Signed-off-by: Ruben Jenster <r.jenster@drachenfels.de>
the commit 38b13a3 ("Use asyncio for subprocess calls") broke the way
exit codes are reported from the podman compose build command.
The tasks are awaited as they finish which means that if a later build
finishes sucessfully after a failing build, it overwrites status.
Previously the `parse_return_code` function would skip updating the status
if the new return code was zero, but in removing it, this logic was not
carried forward.
Fixes: 38b13a3 ("Use asyncio for subprocess calls")
Signed-off-by: charliemirabile <46761267+charliemirabile@users.noreply.github.com>
When running 'podman-compose down <service>', if service is not part of
the compose, a KeyError exception is raised in function 'get_excluded'.
By only allowing evaluation of services that exist in the compose
provides a cleaner and gentler exit for this case.
Signed-off-by: Rafael Guterres Jeffman <rjeffman@redhat.com>
Added flake8 excludes to rules that are already ignored by the current
code to avoid validation issues with code that has already been
approved. Added pylint disable to line with lint offense already
accepted.
Signed-off-by: Italo Maia <italo.maia@gmail.com>
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>