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

37 lines
1.2 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

tags:: docker, netzwerk
## Externes macvlan Netzwerk erstellen
- ### Linux allgemein
``` bash
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](https://www.synology-forum.de/threads/failed-to-create-the-macvlan-port-device-or-resource-busy-loesung.116719/)
``` bash
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:
- ``` yaml
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