docker network disconnect -f mynet myapp

Category: Docker

docker network disconnect -f mynet myapp

Force-disconnect a container from a network

Removes myapp from mynet; -f forces the operation when the container is running or unreachable. After disconnecting, cross-container DNS resolution on that network stops. Networks cannot be removed while containers use them.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.