The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Do you want multiple Docker containers to be able to communicate? You need to add the containers to the same docker network and this guide explains several ways to do that.
Step 1: Create a Docker Network (Optional)
Creating a new Docker network is pretty simple. All you require is a single command – docker network create <network-name>.
In the example command below, I will create a bridge network called “mysql-phpadmin-nw.”
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstalldocker network create mysql-phpadmin-nw
The command creates the network and displays it ID. To confirm that the network has been created, I’ll run the “docker network ls” command.
Popular on Amazon
- Cat-6 UTP (Unshield Twisted Pair) ethernet cables for connecting networked devices such as computers, printers, routers, and more
- RJ45 connectors ensure universal connectivity; 250 MHz bandwidth
- Low signal loss with a transmission speed up to 10 gigabit per second
- Snagless plug design helps prevent damage when plugging/unplugging cable
- Gold-plated contacts and bare copper conductors improve signal integrity and resist corrosion

Finally, to confirm that no container is currently connected to this network, I’ll execute the command below:
Docker network inspect mysql-phpadmin-nw
The command returns a bunch of information about the network. Scrolling down to the “Containers” section, you’ll notice that it is currently empty.
This confirms that no container is connected to this network.

Step 2 (Option 1): Attach an Existing Container to a Network
You can join a running container to a network with a very simple Docker command. I have a running MySQL container that is not linked to the “mysql-phpadmin-nw” Docker network I created in the last section.
Also popular on Amazon
- Designed for Outdoor & Direct Burial Installations – Heavy-duty double-shielded Cat8 Ethernet cable minimizes EMI/RFI interference and delivers stable long-distance performance. Waterproof, anti-corrosion PVC jacket allows safe direct burial and reliable use in outdoor or indoor environments.
- 26AWG for Stable High-Load Networks – Thicker 26AWG conductors provide faster, more stable data transmission than standard 32AWG cables. Ideal for high-performance home networks, gaming setups, smart homes, and data-intensive applications.
- F/FTP Shielding & Hyper-Speed Performance: Cat8 Ethernet cable constructed with 4 shielded foiled twisted pairs and 26AWG OFC conductors; supports bandwidth up to 2000 MHz and data transmission speeds up to 40 Gbps, effectively reducing signal interference and ensuring stable connections. Ideal for low-latency gaming, 4K/8K streaming, and high-speed internet connections.
- RJ45 Connectors & Wide Compatibility: Cat8 Ethernet cable with two shielded RJ45 connectors; compatible with networking switches, IP cameras, routers, Nintendo Switch, modems, PS3, PS4, Xbox, patch panels, servers, smart TVs, and more; works with Cat7, Cat6, Cat5e, and Cat5 devices
- Weatherproof & UV Resistant: Outdoor-rated Cat8 Ethernet cable with UV-resistant PVC jacket; withstands direct sunlight, extreme cold, humidity, and hot weather; anti-aging and durable; Includes 18-month support.
To bind the MySQL container to mysql-phpadmin-nw, I will execute the command below:
Docker network connect mysql-phpadmin-nw mysql
“mysql” is the name of the MySQL container. You can get this information by running the “docker ps” command.

Before proceeding, let’s check that the MySQL container is now linked to the mysql-phpadmin-nw network.
This time, the “Docker network inspect mysql-phpadmin-nw” command confirms that a container called “mysql” is connected to this network!
Also popular on Amazon
- 40 Gbps 2000 Mhz High Speed: The Cat 8 ethernet cable support max. 40 Gbps data transfer and 2000 MHz Brandwith, ideal for gaming and streaming, greatly improving upload and download speed, sound, image and resolution quality
- Excellent Anti-interference: The ethernet cable comes with 4 shielded foiled twisted pairs (F/FTP), pure copper core and gold-plated RJ45 connector, reducing interference, noise and crosstalk, making network speed faster and more stable
- Marvelous Durability: Internet cable wrapped with quality cotton braided cord, which makes the LAN cable stronger and more durable. The test proves that this internet cable can be bent at least 10000 times without broken, very suitable for long-term use
- PoE Supported: All lengths of ethernet cord can support the PoE power supply function except 65ft. You don't need additional power supply when installing a PoE camera, which is very convenient and safe
- Wide Compatibility: With the RJ45 Connector, network cable can be perfectly compatible with computers, laptops, modems, routers, PS5, X-Box and other networking devices. It can also be fully backward compatible with Cat7, Cat6e, Cat6, Cat5e, Cat5

Step 2 (Option 2): Join a Container to a Network at Creation
While starting a container with the “Docker run” command, you can attach a network to the container. To demonstrate this, I’ll start a phpmyadmin container and bind it to the network I created earlier.
I will now start a new phpmyadmin container and join it to the mysql-phpadmin-nw Docker network. Here is the command that performs this magic!
docker run -p 8081:80 \ --network mysql-phpadmin-nw \ --name phpmyadmin \ --link mysql:db \ -d phpmyadmin
The “–network” option is used to bind the new container to an existing network. Equally important to a phpmyadmin specifically is the “–link” option which is required to link it to the MySQL databases.
Recommended Free Tools
Let’s now execute the command. Because I used the “-d” option, the container starts in detached mode.
Also popular on Amazon
- Cat 6 performance at a Cat5e price but with higher bandwidth
- High Performance Cat6, 30 AWG, RJ45 Ethernet Patch Cable provides universal connectivity for LAN network components such as PCs,computer servers,printers,routers,switch boxes,network media players,NAS,VoIP phones
- Jadaol cat6 standard cable support Cat8 and Cat7 network and provides performance of up to 250 MHz 10Gbps and is suitable for 10BASE-T, 100BASE-TX (Fast Ethernet), 1000BASE-T/1000BASE-TX (Gigabit Ethernet) and 10GBASE-T (10-Gigabit Ethernet)
- UTP(Unshielded Twisted Pair) patch cable with RJ45 gold-plated Connectors and are made of 100% bare copper wire, ensure minimal noise and interference
- The unique flat cable shape allows for a cleaner and safer installation. You can easily and seamlessly make the cable run along walls, follow edges & corners or even make it completely invisible by sliding it under a carpet.
This means that it starts on the background.

Once again, we’ll confirm that this newly started container is also linked to the network. Running the “Docker network inspect” command reveals that both containers are indeed connected to our Docker network!

Frequently Asked Questions
Run the “docker network disconnect” command to detach the container from the existing network. After that, execute the “docker network connect” command to link the container to the new network.
Yes, you can connect a Docker container to two networks.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →You can create a Docker network bridge by running the “Docker network create” command and entering the name of the bridged network you want to create at the end of the command.
For example to create a Docker network bridge called “test-bridge-network,” run this command: Docker network create test-bridge-network.
Also popular on Amazon
- IN THE BOX: 50-foot RJ45 Cat-6 Ethernet patch internet cable
- COMPATIBILITY: RJ45 connectors ensure universal connectivity
- PERFORMANCE: Transmits data at speeds up to 1,000 Mbps (or 1 Gigabit per second); 10x faster than Cat-5 cables (100 Mbps)
- USES: Connects computers to network components in a wired Local Area Network (LAN); great for laptops, tablets, routers, printers, gaming consoles, and more
- DURABLE DESIGN: Gold plated RJ45 connectors for accurate data transfer and corrosion-free connectivity
Yes, each Docker container has its IP address. You can view the IP address of a container by running the “docker container inspect” command.
The IP address of the container will be displayed in the “Networks” section of the results.
The default Docker network driver is bridge.
Thank you for reading. Kindly share your thoughts about this topic or ask a question using the comments form at the bottom of this page.
Alternatively, you can respond to the “Was this page helpful?” question below.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

