network_disconnect
Disconnect a container from a Docker network while keeping it running, or force-remove a stale endpoint to enable network deletion.
Instructions
Disconnect a container from a network.
The container keeps running with its other network attachments; only this endpoint is removed
(the reverse of network_connect). A network with connected containers cannot be deleted, so
disconnect them before network_remove.
Args: container: The container id or name to disconnect force: Force the disconnect; use to clear a stale endpoint (e.g. from a deleted container)
Returns: bool: True after the container is disconnected
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | ||
| container | Yes | ||
| id_or_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |