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+.
This commit is contained in:
Felix Fontein
2024-07-23 17:34:26 +02:00
committed by GitHub
parent 11ce793f7d
commit 2ddadf1e2b
5 changed files with 50 additions and 6 deletions
+3
View File
@@ -722,6 +722,9 @@ options:
description:
- Endpoint MAC address (for example, V(92:d0:c6:0a:29:33)).
- This is only available for Docker API version 1.44 and later.
- Please note that when a container is attached to a network after creation,
this is currently ignored by the Docker Daemon at least in some cases.
When passed on creation, this seems to work better.
type: str
version_added: 3.6.0
networks_cli_compatible: