-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Docker Engine Networking updates for style, clarity #24322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,5 +1,5 @@ | ||||||
| --- | ||||||
| title: Networking overview | ||||||
| title: Networking | ||||||
| linkTitle: Networking | ||||||
| weight: 30 | ||||||
| description: Learn how networking works from the container's point of view | ||||||
|
|
@@ -29,28 +29,37 @@ routing table, DNS services, and other networking details. | |||||
| This page describes networking from the point of view of the container, | ||||||
| and the concepts around container networking. | ||||||
|
|
||||||
| When Docker Engine on Linux starts for the first time, it has a single | ||||||
| built-in network called the "default bridge" network. When you run a | ||||||
| container without the `--network` option, it is connected to the default | ||||||
| bridge. | ||||||
|
|
||||||
| Containers attached to the default bridge have access to network services | ||||||
| outside the Docker host. They use "masquerading" which means, if the | ||||||
| Docker host has Internet access, no additional configuration is needed | ||||||
| for the container to have Internet access. | ||||||
|
|
||||||
| For example, to run a container on the default bridge network, and have | ||||||
| it ping an Internet host: | ||||||
|
|
||||||
| ```console | ||||||
| $ docker run --rm -ti busybox ping -c1 docker.com | ||||||
| PING docker.com (23.185.0.4): 56 data bytes | ||||||
| 64 bytes from 23.185.0.4: seq=0 ttl=62 time=6.564 ms | ||||||
|
|
||||||
| --- docker.com ping statistics --- | ||||||
| 1 packets transmitted, 1 packets received, 0% packet loss | ||||||
| round-trip min/avg/max = 6.564/6.564/6.564 ms | ||||||
| ``` | ||||||
| ## Bridge network | ||||||
|
|
||||||
| When Docker Engine starts for the first time, it uses a single | ||||||
| built-in network called the default bridge network. This means that when | ||||||
| you start container without specifying `--network` option, the container | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Grammar error: Missing articles The sentence is missing two articles:
Current:
Should be:
Per STYLE.md, use articles for clarity and grammatical correctness. |
||||||
| defaults to the `bridge` value. When your Docker host (the virtual or physical | ||||||
| machine running Docker) has Internet access, no additional configuration is | ||||||
| needed for the container to have Internet access. | ||||||
|
Comment on lines
+34
to
+39
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The engine doesn't really "use" a network; the default This paragraph combines two unrelated things: the fact that there is a default network, and the fact that containers can access the internet. (I am not sure why it is/was written as if this is unique to the default bridge network; it's true for any |
||||||
|
|
||||||
| The Docker bridge network is an isolated network for containers to communicate | ||||||
| with each other. | ||||||
|
|
||||||
| * By default, the bridge network gives your containers | ||||||
| access to external networks through masquerading, or borrowing your Docker | ||||||
| host's public IP address to make and receive requests from the Internet. | ||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| * While your containers communicate on the bridge network, devices | ||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Containers on the default network do not communicate with each other. Containers on custom bridge networks do. |
||||||
| with access to your external network only see communication coming from and | ||||||
| going to your containers with your Docker host's IP address. | ||||||
|
|
||||||
| If you want to test the bridge network, you can send a ping request | ||||||
| from an active container and wait for the reply. For example: | ||||||
|
|
||||||
| ```console | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CRITICAL: Code block indentation error The code block is indented with 4 spaces before the triple backticks: This is incorrect Markdown formatting that will likely break rendering. Code blocks should start at column 0 (not indented) unless they're inside a list item. Fix: Remove the 4-space indentation: |
||||||
| $ docker run --rm -ti busybox ping -c1 docker.com | ||||||
| PING docker.com (23.185.0.4): 56 data bytes | ||||||
| 64 bytes from 23.185.0.4: seq=0 ttl=62 time=6.564 ms | ||||||
|
|
||||||
| --- docker.com ping statistics --- | ||||||
| 1 packets transmitted, 1 packets received, 0% packet loss | ||||||
| round-trip min/avg/max = 6.564/6.564/6.564 ms | ||||||
| ``` | ||||||
|
|
||||||
| ## User-defined networks | ||||||
|
|
||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this section is not meant to explain bridge networks in general, but the default network