So I’ve been trying to figure this out for a few days and I would like to ask if anyone is well versed in how to set up a docker macvlan for my Nextcloud and Wordpress installations so they don’t clash with the lame Synology blocked ports 80 and 443.
I’m doing most things via command line, so the Nextcloudpi command is (using the example 192.168.1.125) (My understanding is that the Docker UI on Synology filters use of port 80 too.)
DOMAIN=192.168.1.125
docker run -d -p 4443:4443 -p 443:443 -p 80:80 -v /volume1/docker/nextcloudplus:/data --name nextcloudplus ownyourbits/nextcloudpi-x86 $DOMAIN
My question is how to modify the following so I can bring up the container on its own IP .125
docker network create -d macvlan --subnet=192.168.1.0/24 --gateway=192.168.1.1 --ip-range=192.168.1.200/27 -o parent=eth0 bridged_lan
range is (.96-.127), the parent could be either the LAN1 or LAN2 (I was also thinking about somehow taking this other ethernet port and binding my services to it, but creating this virtual IP address for new containers is much nicer for me.)
then
docker network connect bridged_lan nextcloudplus OR
update the nextcloudplus command-
docker run --restart=always --network=bridged_lan --ip=192.168.1.125 -d -p 4443:4443 -p 443:443 -p 80:80 -v /volume1/docker/nextcloudplus:/data --name nextcloudplus ownyourbits/nextcloudpi-x86 $DOMAIN
If I wanted to use 192.168.1.125, then could I change the CIDR to 192.168.1.124/31 - anyway, if anyone is super fancy with this here are my specific questions.
-
What is the right sequence of commands to create a bridge network (seems I may want to have a range so I can do this for 2-3 other containers - bridge_eth0_1, bridge_eth0_2)?
-
Is accessing the 2nd ethernet port game on Synology so I don’t overload the NIC?
-
Are there other commands or memory or settings I should be aware of if I do this? Nextcloudpi-x86 has its own firewall, so I would be thinking of using containers that are themselves well set up.
-
Seems like this should be how Pi-Hole should work, Wordpress, and a number of other services that Synology seems to be making it a pain to get working on this system.
-
Is this all that is needed to create the IP address on the network? Does docker in the network create do something with the IP address you want and the DHCP server or the host and work out how the IP address just appears?
Thanks in advance.