The Docker HOST and MACVLAN Networks - Docker Networks part 2

Опубликовано: 04 Октябрь 2024
на канале: OneMarcFifty
27,656
884

MANY THANKS TO ALL MY PATRONS on   / onemarcfifty   !!!

Part 2 of the Docker Networking series. The docker bridge network is fine for most tasks with docker containers. In this episode we will use Portainer again to define docker containers using the docker host network and the docker MacVLAN Network.


Breakdown of the episode:

01:26 the docker host network
03:30 Performance considerations: Host vs. bridge network
08:10 the Docker MacVlan Network

Portainer Documentation is here: https://documentation.portainer.io/v2...

sudo apt install docker.io
(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/docker.sock:/var/run/docker.sock portainer/portainer-ce

(In portainer, click on "Networks" on the left, you'll see the networks)
(on the command line)

docker network ls



Commands that I use in the video:


(Pulling the image and running it)
docker run -d nginxdemos/hello



with the host network:


docker run --network host -d nginxdemos/hello


creating the macvlan network in a one-liner:


docker network create -d macvlan -o parent=eth0 myMacVlan


In order to execute shell (/bin/bash) in the container on the command line


docker exec -it CONTAINERNAME /bin/bash

Commands I type INSIDE the containers:




ip addr
ping www.google.com

apt update && apt install iperf3

running iperf3 in server mode

iperf3 -s
running iperf3 in client mode
iperf3 -c (serverIP) -p (portNumber)
apt update && apt install iproute2 dhcpcd5 iputils-ping


Please support me on patreon:   / onemarcfifty  
My youtube channel:    / onemarcfifty  
Marc on Twitter:   / onemarcfifty  
Marc on Facebook:   / onemarcfifty  
Marc on Reddit:   / onemarcfifty  
Chat with me on Discord:   / discord  

Licence-free music on / Lizenzfreie Musik von https://www.terrasound.de/lizenzfreie... music on / Lizenzfreie Musik von https://www.terrasound.de/lizenzfreie...


The docker logo from Wikimedia Commons By dotCloud, Inc. - File:Docker (container engine) logo.png, Apache License 2.0, https://commons.wikimedia.org/w/index...


The Thumbnail of this video is under the Apache 2.0 License: https://www.apache.org/licenses/LICEN...