MANY THANKS TO ALL MY PATRONS on !!! Many thanks for your replies to the poll - your wish is my command and here is the episode on docker networks. As there is so much to tell about docker networks, we will talk about Bridges in this episode. In the next episode we will talk about the host and macvlan network. Networking with Docker, docker bridge networks and docker host and macvlan networks as well as docker-compose are subjects of this series. We will define the networks in the Portainer Networking section 0:00 Intro 1:23 TLDR / TLDW / Chapters 1:42 Describing the setup nginxdemos/hello 2:08 What do we need ? 3:10 Pull the image 4:00 examining the container 5:33 IP Connectivity on the bridge 7:30 Network access 7:55 Hostnames 8:33 Name resolution default bridge 9:22 Port mapping 10:15 The bridge is NAT-ed 11:10 user defined bridges 13:26 Summary bridges 14:00 automate with docker-compose 18:03 Outlook, wrap-up Here's the list of the commands / steps used in the video: Portainer Documentation is here: sudo apt install (on a Pi it may be called docker-ce) One liner to start portainer: docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/ :/var/run/ portainer/portainer-ce (In portainer, click on "Networks" on the left, you'll see the networks) (on the command line) docker network ls (Pulling the image and running it) docker run -d nginxdemos/hello (in Portainer, Containers Menu, then "Add Container") (Finding the IP address - click on the container name in Portainer) Default Bridge IP is usually , the docker host is (Click on the container name and Select "Duplicate/Edit" to clone it) In order to execute shell (/bin/ash) on the command line docker exec -it CONTAINERNAME /bin/ash Commands I type INSIDE the containers: ip addr hostname ip route ping ping ping Create the image with port mapping and container name: docker run -d --name nginx1 -p 81:80 nginxdemos/hello docker run -d --name nginx2 -p 82:80 nginxdemos/hello (now you can browse to localhost:81 or localhost:82) Create the bridge network: docker network create -d bridge --subnet --gateway --ip-range --attachable marcsbridge In order to run the containers on the user defined bridge: docker run -d --name nginx1 -p 81:80 --network marcsbridge nginxdemos/hello docker run -d --name nginx2 -p 82:80 --network marcsbridge nginxdemos/hello Install docker-compose: sudo apt install docker-compose The docker compose file can be found here: The Microsoft Visual Studio Code Site is here: (Download the .deb for Ubuntu/Debian, you will then find the File in your Downloads directory. You can then install it with): sudo dpkg -i (Filename) for example sudo dpkg -i In order to have the docker-compose extension in Visual Studio Code, select View-Extensions. There are many extensions available, e.g. "Docker Extension Pack" or "Docker Explorer" by Jun Han, or "Docker" by Microsoft or "Docker Compose" by p1c2u Command line compose up : docker-compose -f " " up -d --build Please support me on patreon: My youtube channel: Marc on Twitter: Marc on Facebook: Marc on Reddit: Chat with me on Discord: Licence-free music on / Lizenzfreie Musik von music on / Lizenzfreie Musik von The docker logo from Wikimedia Commons By dotCloud, Inc. - File:Docker (container engine) , Apache License 2.0, The Thumbnail of this video is under the Apache 2.0 License:











