Рет қаралды 4,389
By popular request, in this video I revisit VLANs by explaining how to use Docker with VLANs.
On your Docker host, you must determine the name of the network interface with: ip route
List your current Docker containers:
docker ps
List your Docker networks:
docker network ls
Create a Docker network in my example:
docker network create -d macvlan --subnet=192.168.100.0/24 --gateway=192.168.100.1 -o parent=qvs0.100 vlan100
Create a container to use the new network:
docker run -d --name=Whiteboard -p 8080:8080 --memory=2g --cpus=1 --restart=always --net=vlan100 --ip=192.168.100.17 rofl256/whiteboard
Other commands:
docker stop Whiteboard
docker rm Whiteboard
docker network rm vlan100
[Chapters]
00:00 Intro
00:35 Docker with VLANs
01:11 What does Docker do?
02:59 How Most Folks Do VLANs
03:55 Switch Port Profiles
04:40 What Does Macvlan Do?
05:44 Docker and macvlan
07:46 Docker and macvlan Showcase
09:38 Docker and macvlan - SSH
12:03 Running the application on the new network
14:14 Summary
-----
Come visit us at: www.scottibyte.com
Discourse: discussion.scottibyte.com
RocketChat: chat.scottibyte.com