Welcome back, and in this part of the course I want to cover the fundamentals of Docker Container Networking. Now this is a complex topic, and so in this fundamentals course, I'm only going to cover the basics, but let's get started. At this level, there are two modes of Docker Networking which you need to understand, Host Networking and Bridge Networking. To explain both, let's start with two Docker Hosts, one on the left and one on the right. And then inside these two Hosts, two Containers each. And let's say these Containers are all running the same Containerized application, which on the Container uses TCP Port 1337. And then in the middle, somebody trying to access the Containers. And let's say that his name is Heisenberg. Now let's start on the right, and this side is using Host Networking where the Containers share the Network of the Host. So when you run a Container in this way, the Host Port is the same Port that the Container application users. Now this sounds simple and it is, however it does have its problems. Let's say that we run the top Container, and with this Networking mode, it means that since the application in this Container users Port TCP 1337, then the same Port is consumed on the Docker Host. And Heisenberg in the middle here can access it using the Host IP and then Port TCP 1337. However, if we attempt to run another Container on the same Host using the same Docker Image using the same Networking mode, it's going to fail because Port TCP 1337 is already used on the Host. Now Host Networking is great if you want to run lots of different Containers on a Host, which use different Ports. The problems start if you need to run multiple at the same Container. So you need to scale horizontally or run multiple versions of the same service for different clients. Now this problem is fixed with a second mode of Networking and this is called Bridge Networking. With this Network type, a bridge Network is created separately, and Containers can be connected to this bridge Network. Each Container gets its own unique IP address on this Network. And because of this, each Container can use the same Port because its IP address is unique on this Network. So in this example, we have Container one at the top. It has its own IP address on the bridge Network, and so on the bridge Network, IP1 on TCP Port 1337 has the application running within Container one. On the same bridge Network, we have Container two at the bottom, so it has its own IP, IP2. And this IP also on Port TCP 1337 has the same application running within Container two. Now, right now, these two Containers can communicate with each other directly because they're on the same bridge Network. So by Default, any Containers on the same bridge Network can communicate, but they can't be reached from outside of the Docker Host. For that, we need to publish them. And the way this is done is by publishing a Container Port to a Host Port, and you'll often see this written as Host Port:Container Port. So for example, we could run Container one using -P 1337:1337, and this would publish Container one Port 1337 through to Host Port 1337, at which point it would be accessible by our customer Heisenberg. We can also publish Container two, but we can't use Host Port 1337 because that's already used. Instead, we might choose to use this option, so -P 1338:1337, and this would publish Container Port 1337 through to Host Port 1338. And then our customer could also access this Container. So by using Bridge Networking and publishing Containers, we're able to publish the same Container to different Host Ports. Now the key takeaways from this part of the course are that with Host Networking, you don't get to choose the Port mappings because they aren't needed. Whatever a Container uses for its application Port is used on the Host. It's simple, no configuration is needed, but it limits you to one of each Container on one Host. But you can run many different Containers on the same Host as long as they use different Ports. Bridge Networking lets you overcome this limitation, but you need to publish this Port mapping for every Container. So map a Container Port to a Host Port for every single Container which uses this Networking mode. Now this is a Docker Networking fundamentals lesson, and so I'm keeping it intentionally simple. There are many options for Bridge Networking and you can define multiple Bridge Networks. There are also other types of more complicated Networking which I'll be covering elsewhere, most likely in a more in-depth Docker course. For now though, this is everything on this topic, and don't worry, you're going to get the chance to experience this practically in an upcoming part of the course. For now, this is everything on the topic of Docker Networking Fundamentals. So when you're ready, go ahead and move on to the next part of the course.