Commit Graph

22 Commits

Author SHA1 Message Date
Felix Fontein
dc0a554966
docker_container: do not send wrong host IP for duplicate ports (#1214) (#1215)
* DRY.

* Port spec can be a list of port specs.

* Add changelog fragment.

* Add test.

(cherry picked from commit 846fc8564b)
2025-11-26 07:08:38 +00:00
Felix Fontein
a80e6bf7ec
docker_image(_pull), docker_container: fix compatibility with Docker 29.0.0 (#1192) (#1198)
* Add debug flag to failing task.

* Add more debug output.

* Fix pull idempotency.

* Revert "Add more debug output."

This reverts commit 64020149bf.

* Fix casing.

* Remove unreliable test.

* Add 'debug: true' to all tasks.

* Reformat.

* Fix idempotency problem for IPv6 addresses.

* Fix expose ranges handling.

* Update changelog fragment to also mention other affected modules.

(cherry picked from commit 90c4b4c543)
2025-11-15 17:47:34 +01:00
Felix Fontein
fd011d3871
Support missing fields and missing types in mounts. (#1134) 2025-09-29 22:35:07 +02:00
Felix Fontein
e9f4553b01
docker_container idempotency: work around Docker not returning true configured command when command is [] (#1085)
* Work around Docker not returning true configured command when command is [].

* Lint.

* Add test.

* Add changelog fragment.
2025-06-08 19:05:09 +02:00
Felix Fontein
f69536ef3b Improve language. 2024-12-28 14:30:49 +01:00
Felix Fontein
ebec16d42c
Handle network_mode=default correctly for Docker 26.1.0+. (#936) 2024-07-25 18:30:12 +02:00
Felix Fontein
2ddadf1e2b
docker_container: pass networks to Daemon on container creation (#933)
* Pass networks to Daemon on container creation.

* Restore old behavior, and only provide all networks on creation for API 1.44+.
2024-07-23 17:34:26 +02:00
Fran Jurinec
9b5dbd4543
Add support from device_cgroup_rules parameter (#910) 2024-07-04 09:51:32 +02:00
x4rd0o1Vtx
5016a96eba
Allow healthcheck override without test option (#847)
* Add healthcheck test_cli_compatible option

* Update plugins/module_utils/util.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/docker_container.py

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-05-15 18:45:01 +02:00
x4rd0o1Vtx
a4a05e7fa5
Add healthcheck start-interval option (#848) 2024-05-09 21:22:06 +02:00
Felix Fontein
fcf608b334
Add networks[].mac_address option. (#763) 2024-01-20 14:23:12 +01:00
Felix Fontein
c4c347c626
Add proper platform handling. (#705) 2023-12-10 09:03:32 +01:00
Felix Fontein
d8cef6c71e
docker_container: refactoring preparing better comparisons (#713)
* Always get the container's image as well to allow get_value() to use that one too.

* Allow options and engines to overwrite comparison functions.

* Do not fail if image (by ID) cannot be found.

* Allow to control when container image is needed.

* Pass option to compare function.

* Allow to pass the host info for retrieving a value.

* Add changelog fragment.
2023-12-05 07:26:11 +01:00
Kristof Mattei
d2f551fc5d
fix: fix tmpfs_size and tmpfs_mode not being set (#580)
* fix: fix tmpfs_size and tmpfs_mode not being set

* fix: wrong file

* fix: add changelog fragment

* fix: update changelog fragment to match formatting

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-02-10 14:05:09 +01:00
Felix Fontein
54a3dc151d
Remove unneccessary imports (#575)
* Remove unneccessary imports.

* Add noqas.
2023-02-09 15:25:45 +01:00
Felix Fontein
3a40112a76
Remove timeout when waiting for container to finish. (#527) 2022-12-08 22:15:42 +01:00
Felix Fontein
edf0d3ec99
Make kill_signal accept strings. (#506) 2022-11-28 22:10:07 +01:00
Felix Fontein
5b31f17016
Add image_name_mismatch option. (#488) 2022-11-01 19:48:58 +00:00
Felix Fontein
a4539a309e
Move licenses to LICENSES/, use SPDX-License-Identifier, mention all licenses in galaxy.yml (#430)
* Move licenses to LICENSES/, use SPDX-License-Identifier, mention all licenses in galaxy.yml.

* ignore.txt lines cannot be empty or contain only a comment.

* Cleanup.

* This particular __init__.py seems to be crucial.

* Try extra newline.

* Markdown comments are a real mess. I hope this won't break Galaxy...

* More licenses.

* Add sanity test.

* Skip some files, lint.

* Make sure there is a copyright line everywhere.

* Also check for copyright line in sanity tests.

* Remove colon after 'Copyright'.

* Normalize lint script.

* Avoid colon after 'Copyright' in lint script.

* Improve license checker.

* Update README.md

Co-authored-by: Maxwell G <9920591+gotmax23@users.noreply.github.com>

* Remove superfluous space.

* Referencing target instead of symlink

Co-authored-by: Maxwell G <9920591+gotmax23@users.noreply.github.com>
2022-07-20 07:45:33 +02:00
Felix Fontein
e26890a909
Implement platform parameter for docker_container, first version. (#426) 2022-07-15 17:14:57 +02:00
Felix Fontein
37c868e192
Add support for cgroupns_mode parameter. (#427) 2022-07-15 17:14:23 +02:00
Felix Fontein
77e63e2cca
Rewrite docker_container to use Docker API directly (#422)
* Begin experiments for docker_container rewrite.

* Continued.

* We support API >= 1.25 only anyway.

* Continued.

* Fix bugs.

* Complete first basic implementation.

* Continuing.

* Improvements and fixes.

* Continuing.

* More 'easy' options.

* More options.

* Work on volumes and mounts.

* Add more options.

* The last option.

* Copy over.

* Fix exposed ports.

* Fix bugs.

* Fix command and entrypoint.

* More fixes.

* Fix more bugs.

* ci_complete

* Lint, fix Python 2.7 bugs, work around ansible-test bug.

ci_complete

* Remove no longer applicable test.

ci_complete

* Remove unnecessary ignore.

ci_complete

* Start with engine driver.

* Refactoring.

* Avoid using anything Docker specific from self.client.

* Refactor.

* Add Python 2.6 ignore.txt entries for ansible-core < 2.12.

* Improve healthcheck handling.

* Fix container removal logic.

* ci_complete

* Remove handling of older Docker SDK for Pyhon versions from integration tests.

* Avoid recreation if a pure update is possible without losing the diff data.

* Cover the case that blkio_weight does not work.

* Update plugins/module_utils/module_container/docker_api.py

Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>

* Improve memory_swap tests.

* Fix URLs in changelog fragment.

Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
2022-07-15 07:24:14 +02:00