50 Commits

Author SHA1 Message Date
Elsa
98f166d2e4 Implement pids_limit
Signed-off-by: Elsa <zeyugao@outlook.com>
2025-04-21 22:51:37 +03:00
Romain Gasquet
ff58a0bff0 Add newsfragment
Signed-off-by: Romain Gasquet <romain.gasquet@neutron.fr>
2025-04-19 14:33:15 +02:00
Povilas Kanapickas
342a39dcfe
Merge pull request #1179 from knarfS/fix_port_cmd
Fix port command
2025-04-14 18:05:53 +03:00
Povilas Kanapickas
d6b8476573
Merge pull request #1180 from knarfS/add_rmi_arg
Add rmi argument for down command
2025-04-14 18:04:09 +03:00
Frank Stettner
da46ee3910 Fix port command for dynamic host ports
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>
2025-04-08 13:57:19 +02:00
Frank Stettner
cefa68dc75 Implement rmi argument for down command
Fixes #387

Signed-off-by: Frank Stettner <frank-stettner@gmx.net>
2025-04-08 13:53:27 +02:00
Yashodhan Pise
27cf8da06f Addition of relevant newsfragments file
Signed-off-by: Yashodhan Pise <technoy@gmail.com>
2025-04-05 20:32:58 +05:30
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
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
Povilas Kanapickas
7d7533772b
Merge pull request #1165 from drachenfels-de/fix-project-name-interpolation
Fix `COMPOSE_PROJECT_NAME` interpolation
2025-03-20 19:26:03 +02:00
Ruben Jenster
65b455f081 Fix project name evaluation order
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>
2025-03-20 12:07:07 +01:00
Ruben Jenster
98b9bb9f8e Fix interpolation for COMPOSE_PROJECT_NAME
Fixes #1073

Signed-off-by: Ruben Jenster <r.jenster@drachenfels.de>
2025-03-20 12:07:07 +01:00
Mohammad Kazemi
f5a6df6dc4 added changes to release notes
Signed-off-by: Mohammad Kazemi <mokazemi@disroot.org>
2025-03-19 16:02:34 +03:30
Rafael Guterres Jeffman
d4760712b7 Don't raise exception on inexistent services in 'down' command
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>
2025-03-05 15:49:52 -03:00
Povilas Kanapickas
a54f0fa573
Merge pull request #1149 from AlexandreAANP/fix/windows-asyncio-loop
Fix event loop handling for Windows platform in compose_up function
2025-03-01 16:43:26 +02:00
Ian Fijolek
4cd1642be0 Add quiet flag to podman-compose config
This skips printing and is useful for validating config files.

Signed-off-by: Ian Fijolek <ian@iamthefij.com>
2025-02-28 12:48:08 -08:00
Alexandre Pita
fd401331e5 added release note to newsfragment directory
Signed-off-by: Alexandre Pita <alexandreanpita@gmail.com>
2025-02-27 11:45:38 +00:00
Jörn Hirschfeld
cbc5a8c8b3 Add newsfragment for interface_name option
Signed-off-by: Jörn Hirschfeld <joern@hirschfeld.tech>
2025-02-23 17:08:06 +01:00
Povilas Kanapickas
15380a809d
Merge pull request #1135 from rpluem-vf/keep_fds_open
Do not close file descriptors when executing podman
2025-02-18 13:26:15 +02:00
Ruediger Pluem
d4e5859370 Do not close file descriptors when executing podman
Do not close file descriptors when executing podman. This allows
externally created file descriptors to be passed to containers.
These file descriptors might have been created through systemd
socket activation. See also
https://github.com/containers/podman/blob/main/docs/tutorials/socket_activation.md#socket-activation-of-containers

Signed-off-by: Ruediger Pluem <ruediger.pluem@vodafone.com>
2025-02-12 11:35:51 +01: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
notdian
e03d675b9b Remove incorrect os.chdir call to fix folder error
Signed-off-by: notdian <dian@fishekqi.com>
2025-01-31 01:24:24 +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
Emanuel Rietveld
bc4177fbdc Exclude dependent containers on up if --no-deps.
Fixes #398.

Signed-off-by: Emanuel Rietveld <e.j.rietveld@gmail.com>
2025-01-15 22:32:28 +01:00
Povilas Kanapickas
6de335beb2 Release notes for 1.3.0
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2025-01-07 21:10:54 +02:00
Povilas Kanapickas
483103ac3a Declare compatibility with Python 3.13
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2025-01-05 13:12:43 +02: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
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
Songmin Li
2cfc617f9e
Support docker-compose like default network behavior
Signed-off-by: Songmin Li <lisongmin@protonmail.com>
2024-12-18 08:48:21 +08: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
Felix Rubio
a67fa0beb5 Adding support for conditional dependencies
Signed-off-by: Felix Rubio <felix@kngnt.org>
2024-12-02 22:13:10 +02:00
Timon de Groot
db0aad97bd podman-compose down removes networks
Fixes #490

Signed-off-by: Timon de Groot <timon.degroot@hypernode.com>
2024-10-21 08:31:09 +02:00
Povilas Kanapickas
a3fb4b373a
Merge pull request #1058 from banditopazzo/705-ssh-key-support-in-build
feat: add support for ssh property in the build command
2024-10-15 03:18:41 +03:00
banditopazzo
ab33954f6c add ssh support for build command
Fixes #705: Add support for ssh property in the build command

Signed-off-by: Domenico Salvatore <banditopazzo@gmail.com>
2024-10-15 00:35:10 +02: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
Povilas Kanapickas
585d344d0a
Merge pull request #1004 from lisongmin/substitution-with-service-environment
Substitution with service environment
2024-07-27 00:06:46 +03:00
Songmin Li
b5eaf314ad Support variable substitution with service's environment
This commit introduces the ability to substitute environment variables
within the 'environment' section of the service definition.

This allows for more dynamic configuration of services.

Signed-off-by: Songmin Li <lisongmin@protonmail.com>
2024-07-27 00:04:06 +03:00
Beat Küng
b3c49df6eb podman_compose.py: support "platform" property in the build command
This was already added to container_to_args() in https://github.com/containers/podman-compose/pull/470
which is used for the 'up' and 'run' commands.

Definition in the schema: https://github.com/compose-spec/compose-spec/blob/main/schema/compose-spec.json#L329

Signed-off-by: Beat Küng <beat-kueng@gmx.net>
2024-07-26 23:58:11 +03:00
Povilas Kanapickas
d95b4d026b Add newsfragment
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2024-07-17 01:43:45 +03:00
Povilas Kanapickas
2091ade7b1 Add newsfragment
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2024-07-08 19:15:16 +03:00
Povilas Kanapickas
f0bae1e2d9 Don't resolve links to compose file
docker-compose uses the path to the compose file even if it's symlink to
get the context directory.

Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2024-03-25 08:18:52 +02: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
24038dace3 Check whether pod exists before trying to create one
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2024-07-03 19:31:13 +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
6ef759c6fd Use newsfragments pattern for the release notes
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2024-06-26 10:21:03 +03:00