docker:networking:change_the_network_of_a_running_container
This is an old revision of the document!
Table of Contents
Docker - Networking - Change the network of a running container
First disconnect the container from the current network:
docker network disconnect network-name container-name
Create another network (optional)
docker network create new-network-name
NOTE: The above command will create a new network and connect it to the bridge driver.
Connect the container to the new network
docker network connect --alias set-alias network-name container-name
docker/networking/change_the_network_of_a_running_container.1753472965.txt.gz · Last modified: 2025/07/25 19:49 by peter