Member-only story

Docker Networking

Park Sehun
4 min readAug 18, 2023

Docker takes care of the networking aspects so that the container can communicate with other containers and the Docker Host.

The Docker networking subsystem is pluggable, using drivers.

Docker drivers are below.

  • bridge
  • host
  • overlay
  • macvlan
  • none

‘docker network ls’ will show the all network components docker is using and drivers.

Bridget Network

Containers will have automatically assigned to the IP address within the bridge network CIDR. Ref

This will provide isolation from containers which are not connected to that bridge network. So you may cover the sensitive services hoping not to be accessed from the random containers.

You can check the CIDR (subnet mask) and Gateway by inspecting it.

Let’s specify the network you want to put the Docker on.

Testing

First I created two containers in the bridge network.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

No responses yet

Write a response