Docker - Network commands
List out all networks that are running with Docker
docker network ls
View details info of a network
docker network inspect network_name (or id)
ex: docker network inspect network bridge
We can check Container :{} to view all containers are connecting via this network
Check container info
docker inspect container_Name (or id)
Create a new network
docker network create --driver bridge networkName
Remove a network
docker network rm networkName
Run Docker with Specific Network
docker run -it --name DockerName --network networkName imageName
Attach Container that is running with a network
docker network connect networkName containerName
Comments
Post a Comment