Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Implementing Modern DevOps

You're reading from   Implementing Modern DevOps Enabling IT organizations to deliver faster and smarter

Arrow left icon
Product type Paperback
Published in Oct 2017
Publisher Packt
ISBN-13 9781786466877
Length 326 pages
Edition 1st Edition
Tools
Concepts
Arrow right icon
Authors (2):
Arrow left icon
Danny Varghese Danny Varghese
Author Profile Icon Danny Varghese
Danny Varghese
 Gonzalez Gonzalez
Author Profile Icon Gonzalez
Gonzalez
Arrow right icon
View More author details
Toc

Docker networking


Networking is an important part of Docker. By default, Docker comes with three networks that we can inspect by executing the following command:

docker network ls

This should produce output similar to the following:

Let's explain the different networks:

  • bridge: This is the default network. It is an entirely different stack from the host machine with a different IP range in the bridge mode (the host machine acts as a router for the containers in this network). The containers created without specifying the network are attached to the default bridge network.
  • host: In this network, containers share the network stack with the Docker host. If you inspect the configuration in the container, you will find that it is the exactly the same as in the Docker host.
  • none: This is easy to guess; the container gets attached to no network: just the loopback interface in the container.

Now it is time to look at some examples. We are going to use busybox, which is the swiss army knife of the Docker...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime
Visually different images