Profile picture
Sidharth R
  • Home
  • Posts
  • Journal
  • Home
  • Posts
  • Journal
  • Search

Docker networking

Updated: 20 Apr 2026 ⚬ Page views: loading...

Docker networking is like batteries included but removable/configurable.

Port checking

docker container port <container>

Network driver

Built-in or 3rd party extensions that give you virtual network features.

Default is bridge network driver.

Networking commands

Find IP of a container

docker contianer inspect --format "{{NetworkSettings.IPAddress}}" <container id>

Show networks

docker network ls

Inspect a network

docker network inspect

Create a new network

docker network create --driver

Connect a container to a network

docker network connect [OPTIONS] NETWORK CONTAINER

Connects a container to a network. You can connect a container by name or by ID. Once connected, the container can communicate with other containers in the same network.

Disconnect a network from container

docker network disconnect

Quick questions

Q: If you wanted multiple containers to be able to communicate with each other on the same docker host, which network driver would you use? A: Use a custom bridge network for most use cases where you want inter-container communication on the same host.

Nerdsid.com

Links
  • Home
  • Contact
  • About
  • Posts
  • Journal
  • Quotes
  • Links worth your time
  • Notes
  • Style guide
© 2026 Sidharth R.
All content on this website is licensed under CC BY-NC-SA 4.0.