Skip to content

Commit

Permalink
docs: updated Docker notes (Pradumnasaraf#47)
Browse files Browse the repository at this point in the history
* Updated docker network in README

* Updated docker network in README with image

---------

Co-authored-by: Sumit Kumar Das <[email protected]>
  • Loading branch information
2 people authored and Pradumnasaraf committed Mar 11, 2023
1 parent 98d8638 commit 8a3d1bf
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,16 @@ We have a file `.dockerignore` which is not required when we copy files into the

### ⚫ Docker Network

- We need create custom bridge network to enable dns resolution between containers. It doesn't work with the default bridge network.
To connect to our created containers docker provides several network drivers. The available default drivers are bridge, host and null.

- Bridge network creates a virtual network that allows containers to communicate with each other using IP addresses. We need to create custom bridge network to enable dns resolution between containers. Only containers connected to the same custom bridge network can communicate with each other directly. It doesn't work with the default bridge network.

- Host network uses the host machine's network stack inside the container. We can use this network for applications that require high network performance. We don't need to expose ports here.

- Using Null network driver disables the networking for the container.

![docker network](https://user-images.githubusercontent.com/37767537/223677649-babf850a-a87f-46bd-bb32-425801f05b2e.png)

- Host: Use the host network stack inside the container. The container will use the host's network interfaces. We don't need to expose ports.

### ⚫ Docker Volumes

Expand Down

0 comments on commit 8a3d1bf

Please sign in to comment.