** DevOps Training: https://www.edureka.co/devops **
This Edureka tutorial on Docker Networking will explain to you the fundamentals of Docker Networking with a hands-on. Below are the topics covered in the tutorial:
1. What is Docker?
2. Docker Networking
3. Goals of Docker Networking
4. Container Network Model (CNM)
5. Network Drivers
6. Hands-On
Check our complete DevOps playlist here (includes all the videos mentioned in the video): http://goo.gl/O2vo13
Docker Networking | Container Network Model (CNM) | Docker Tutorial For Beginners | Edureka
1.
2. DevOps Certification Training www.edureka.co/devops
Topics For Today’s Session
❖ W h a t i s D o c k e r ?
❖ D o c k e r N e t w o r k i n g
❖ G o a l s o f D o c k e r N e t w o r k i n g
❖ C o n t a i n e r N e t w o r k M o d e l
❖ N e t w o r k D r i v e r s
❖ H a n d s - O n
3. DevOps Certification Training www.edureka.co/devops
What is Docker?
Docker is an open platform for developing, shipping, and running applications. Docker enables you to
separate your applications from your infrastructure so you can deliver software quickly.
4. DevOps Certification Training www.edureka.co/devops
Docker Container
Allows a developer to package up the application and all the related files in an isolated environment. So, it has
everything that it needs to run an application inside this environment.
5. DevOps Certification Training www.edureka.co/devops
Docker Networking
Docker containers and services do not need to be aware that they are deployed on Docker, or whether their
peers are also Docker workloads or not., which thus introduces the concept of Docker Networking.
6. DevOps Certification Training www.edureka.co/devops
Goals of Docker Networking
Cross Platform
Decentralized
Support
Flexibility
Scalability
User-Friendly
7. DevOps Certification Training www.edureka.co/devops
Container Network Model
Container Network Model (CNM)
which formalizes the steps required to
provide networking for containers
while providing an abstraction that can
be used to support multiple network
drivers
8. DevOps Certification Training www.edureka.co/devops
Container Network Model Objects
Network Controller
Provides the entry-point
into libnetwork.
Driver
Provides the actual
implementation that makes
network work. Network
Is an implementation of
CNM : Network.
End Point
Provides the connectivity
for services exposed by a
container in a network. Sandbox
Represents container's
network configuration
10. DevOps Certification Training www.edureka.co/devops
Network Drivers: Bridge
Web Container Web Container
Web Container Web Container
Docker
0
172.17.0.2
172.17.0.4
172.17.0.3
172.17.0.5
The default network driver. If you don’t specify a
driver, this is the type of network you are
creating. Bridge networks are usually used when
your applications run in standalone containers that
need to communicate
docker run ubuntu
11. DevOps Certification Training www.edureka.co/devops
Network Drivers: Host
For standalone containers, remove network
isolation between the container and the Docker
host, and use the host’s networking directly. host is
only available for swarm services on Docker 17.06
and higher
docker run ubuntu --network=none
Web Container
5000
Web Container
5000
Web Container
5000
Web Container
5000
12. DevOps Certification Training www.edureka.co/devops
Network Drivers: None
For this container, disable all networking. Usually
used in conjunction with a custom network
driver. none is not available for swarm services.
docker run ubuntu --network=none
Web Container
13. DevOps Certification Training www.edureka.co/devops
Network Drivers: Overlay
Overlay networks connect multiple Docker daemons together and enable swarm services to communicate
with each other. daemons.
14. DevOps Certification Training www.edureka.co/devops
Network Drivers: Macvlan
Macvlan networks allow you to
assign a MAC address to a container,
making it appear as a physical device
on your network. The Docker
daemon routes traffic to containers
by their MAC addresses
docker run ubuntu network create -d macvlan
15. DevOps Certification Training www.edureka.co/devops
Docker Swarm
Docker Swarm is a cluster of machine, all running docker
which provides scalable and reliable platform to run many
containers.
With Swarm, IT administrators and developers can
establish and manage a cluster of Docker nodes as a single
virtual system.
16. DevOps Certification Training www.edureka.co/devops
Docker Swarm Clusters
You can create a swarm of Docker Engines where you can deploy application services. So, you don’t need
additional orchestration software to create or manage a swarm.
17. DevOps Certification Training www.edureka.co/devops
Docker Swarm: Managers & Workers
Every Swarm has at least one manager ( Generally, the one which is initialized first). The default port is 2377
19. DevOps Certification Training www.edureka.co/devops
Hands On - 1
Deploy Apache application over a swarm
cluster on the default network.
20. DevOps Certification Training www.edureka.co/devops
Hands On - 2
Deploy multi tier application over a swarm cluster and then scale one of the services.
21.
22. DevOps Certification Training www.edureka.co/devops
Docker Swarm: Managers & Workers
Internal Distributed State Store
Manager Manager Manager
Worker Worker Worker Worker Worker Worker Worker
23. DevOps Certification Training www.edureka.co/devops
Docker Swarm Clusters
Docker Swarm Manager
Node
Container 1
Container N
Container 2
Container 1
Container N
Container 2
Container 1
Container N
Container 2