![]() To do this, type: docker network create -d macvlan \ Now that we have set up the host, we can continue creating a new network in Docker that can be used by our containers. Ip link add macvlan-br0 link bond0 type macvlan mode bridge ![]() # Set timeout to wait host network is up and running You will have to put this in a script you can run at boot of your Synology device, as these settings will not retain over a reboot as we have to make them on the commandline and cannot make them in the Synology DSM. ![]() This will add a route to the Docker network so it can be reached This will activate the virtual bridge device This adds an IP address on the bridge device so the host has an IP address in the range will give to Docker This adds a bridge device on top of the physical interface with the name macvlan-br0 ip link add macvlan-br0 link bond0 type macvlan mode bridge.We do this by adding a bridge on top of the existing physical interface you use on your network. Now we have to configure the interface Docker can use. In my case, this is bond0 which is what I will use in the examples below. You can find this under Control Panel > Network > Network interface. This can be for instance eth0 for a single interface, or bond0 for when you use channel bonding. Find the name of the network interface your Synology is using to connect to the network you want your Docker containers to be running on.To achieve this, we need to do the following: Prerequisites Solution: do not use host or bridge networking, but put the container on the same network as the host using macvlan. Problem: you cannot easily, using Docker, run multiple instances of the same program - or different program - while listening on the same port. ![]() This is a quick post on how to run multiple instances of on a single Synology host using Docker.
0 Comments
Leave a Reply. |