Commit Graph

27 Commits

Author SHA1 Message Date
Monika Kairaityte
815450aba9 tests/unit: Add test for buid git URL as context
Signed-off-by: Monika Kairaityte <monika@kibit.lt>
2025-03-30 21:56:55 +03:00
Monika Kairaityte
92f0a8583a Fix using git URL as build context
Podman-compose actually did not work with git URL as build context.

Signed-off-by: Monika Kairaityte <monika@kibit.lt>
2025-03-30 21:56:55 +03:00
Monika Kairaityte
5f4fc4618c Add os.path.normpath to normalize dockerfile pathname
Signed-off-by: Monika Kairaityte <monika@kibit.lt>
2025-03-28 22:28:30 +02:00
Piotr Kubiak
f9489afaf5 Allow merging of args in both list and dict syntax
Signed-off-by: Piotr Kubiak <piotr-kubiak@users.noreply.github.com>
2025-03-24 13:31:19 +02:00
Yusuke Matsubara
81a0a5933e Add more logging tests
Signed-off-by: Yusuke Matsubara <whym@whym.org>
2025-02-25 01:52:45 +02:00
Yusuke Matsubara
c289a3b827 Fix logging test coding style
Signed-off-by: Yusuke Matsubara <whym@whym.org>
2025-02-25 01:52:39 +02:00
Matthias Schiffer
43a2f1d01f
Implement x-podman.pod_args to override --pod-args default
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>
2025-02-07 12:11:19 +01:00
Zeglius
105e390f6b Add support for dockerfile_inline
Fixes #864

Signed-off-by: Zeglius <33781398+Zeglius@users.noreply.github.com>
2025-01-27 21:45:42 +02:00
Povilas Kanapickas
f376700972
Merge pull request #1104 from rjeffman/disable_dns
Add support for disable_dns, dns and ignore on network creation
2025-01-19 19:41:30 +02:00
Rafael Guterres Jeffman
9be3ec985f Add network "dns" support
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>
2025-01-17 13:58:13 -03:00
Rafael Guterres Jeffman
6e642dca1f Add network "disable-dns" support
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>
2025-01-17 12:14:15 -03:00
indra
2aa042b9c7 expand service environment_variables before adding to subs_dict
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>
2025-01-16 21:00:49 +11:00
Felix Rubio
804852b218 Provide support for cache_from and cache_to fields
Signed-off-by: Felix Rubio <felix@kngnt.org>
2025-01-05 12:35:30 +02:00
Yusuke Matsubara
f11e08eaac Read log output by chunks if a line is too long
Fixes #1096.

Modified-by: Povilas Kanapickas <povilas@radix.lt>
Signed-off-by: Yusuke Matsubara <whym@whym.org>
2025-01-05 12:28:13 +02:00
Povilas Kanapickas
35cf4bcb72 tests: Add test for container_to_build_args()
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2024-12-30 00:55:19 +02:00
Songmin Li
ac7ec5c166
Support network level mac_address attribute
Signed-off-by: Songmin Li <lisongmin@protonmail.com>
2024-12-29 22:59:58 +08:00
Songmin Li
978a1381bc Support network scoped service aliases
Signed-off-by: Songmin Li <lisongmin@protonmail.com>
2024-12-21 22:52:37 +02:00
Povilas Kanapickas
2891be01d7 Ensure that network_mode and networks are not present at the same time
See
https://docs.docker.com/reference/compose-file/services/#network_mode

Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2024-12-18 19:59:23 +02:00
Jeremy Visser
054c66b568 Add device_cgroup_rules support
"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>
2024-12-06 08:19:54 +11:00
Timon de Groot
90f54b9ca5 Add x-podman.no_hosts extension
Signed-off-by: Timon de Groot <timon.degroot@hypernode.com>
2024-10-14 17:02:36 +02:00
Songmin Li
34f5268e37 Add unittest for rec_subs
Signed-off-by: Songmin Li <lisongmin@protonmail.com>
2024-07-27 00:04:06 +03:00
bg
e2eb883709 Add --network=none if network_mode: none is set; fixes #1001.
Signed-off-by: bg <bg@nerilex.org>
2024-07-17 01:41:04 +03:00
Povilas Kanapickas
5bf4c0fdbe Add a way to remove dashes in default network names
This is the behavior exhibited by docker compose. The network names are
user-visible through external networks, so previously anyone who
migrated from docker-compose needed to change their configuration. Now
it is possible to select compatibility via a flag in x-podman global
dictionary.

Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2024-07-06 18:50:25 +03:00
Povilas Kanapickas
9a4af0ce62 Discover tests instead of passing a list of files to unittest
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2024-07-03 19:50:13 +03:00
Monika Kairaityte
4ec57c1013 unittests: Added unit tests for podman-compose secrets
Signed-off-by: Monika Kairaityte <monika@kibit.lt>
2024-07-02 20:26:58 +03:00
Michaël Nass - PlugN
fa3e0a7772 Alt Dockerfile names fix
Signed-off-by: Michaël Nass - PlugN <michael.nass@free.fr>
2024-06-26 19:09:20 +02:00
Povilas Kanapickas
18472b53ac Move all tests to single directory "tests"
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2024-06-26 11:28:16 +03:00