logseq_kauer/pages/Docker-Container ins Host-N...

1.2 KiB

tags:: docker, netzwerk

Externes macvlan Netzwerk erstellen

  • Linux allgemein

    sudo docker network create -d macvlan
    --subnet=192.168.178.0/24 --gateway=192.168.178.1 --ip-range=192.168.178.0/20 -o parent=eth0  -o macvlan_mode=bridge kbnet
    
  • Synology NAS

    In diesem Fall heißt die Netzwerkkarte ovs_eth0

    sudo docker network create -d macvlan --subnet=192.168.178.0/24 --gateway=192.168.178.1 --ip-range=192.168.178.0/20 -o parent=ovs_eth0  -o macvlan_mode=bridge kbnet
    

Netzwerk in Docker-Compose benutzen:

  • 		services:
    		  xxx:
    		    networks:
    			      kbnet:
    			        ipv4_address: 192.168.178.2
    
    		networks:
    		    kbnet:
    		      external:
    		        name: kbnet
    

Quellen

- [https://github.com/MightyDetail/youtube/wiki/Docker#macvlan](https://github.com/MightyDetail/youtube/wiki/Docker#macvlan)
- ### [[Video]]: 
  type:: [[Video]]
  produzent:: [[]]
  tags:: todo
  url:: https://www.youtube.com/watch?v=cwewnHnZmzA
	- {{video https://www.youtube.com/watch?v=cwewnHnZmzA}}
	- #### Notizen