289769a601
Automatic Documentation Deployment / Sync Docs to https://kb.bunny-lab.io (push) Successful in 8s
22 lines
1.0 KiB
Markdown
22 lines
1.0 KiB
Markdown
---
|
|
tags:
|
|
- Docker
|
|
- Networking
|
|
---
|
|
|
|
## Purpose
|
|
This document records the procedure for create the docker network. Follow the environment assumptions and commands below.
|
|
|
|
### Configure Docker Network
|
|
We want to use a dedicated subnet / network specifically for containers, so they don't trample over the **SERVER** and **LAN** networks. If you are unsure of the name of the network adapter, in this case `eth0`, just type `ipaddr` in the terminal to list the network interfaces to locate it.
|
|
|
|
```text
|
|
docker network create -d macvlan --subnet=192.168.5.0/24 --gateway=192.168.5.1 -o parent=eth0 docker_network
|
|
```
|
|
|
|
!!! note
|
|
Be sure to replace `eth0` with the correct interface name using `ip addr` in the terminal. e.g. It may appear as something else like `ens18`, etc. If the interface doesn't exist, Docker will produce an error complaining about it.
|
|
|
|
## Related Documentation
|
|
- [Related Containers Documentation](<../../../reference/Containers/index.md>) — Find the connected deployments, procedures, and references for this subject.
|