IP-addresses and Docker-containers

Currently reading
IP-addresses and Docker-containers

121
8
NAS
DS918+
Operating system
  1. Windows
Last edited:
I noticed my Docker-containers doesn't get local ip-addresses. My Plex installation gets a 172.17.x.x address and my MariaDb/phpMyAdmin aswell. Is there a way of fixing this? When watching Plex at home on my network it always transcodes because it thinks I'm not on the same network and it's a bit disturbing.
EDIT: I've checked the "network" tab in the Docker-UI and the "bridge"-alternative and I can see the IP-range there but I can't change it?
Thanks.
 
I noticed my Docker-containers doesn't get local ip-addresses.
That's normal for bridged and overlay networks.

My Plex installation gets a 172.17.x.x address and my MariaDb/phpMyAdmin aswell. Is there a way of fixing this?
You can. You need to create a docker macvlan network for this. Its slightly complicated and I am not going to share the commands required to do it. I am a container pro (I make my living with it) and I don't like it and I don't use it. There are not many use cases that realy require a macvlan. I am sure others will chip in and share what's needed to get things up and running.

When watching Plex at home on my network it always transcodes because it thinks I'm not on the same network and it's a bit disturbing.
You can either run your Plex container in the host network or set the "LAN networks" in PMS's settings -> network. My value is "192.168.200.0/255.255.255.0,172.16.0.0/255.240.0.0". My local LAN is 192.168.200.0, replace this one with yours.

EDIT: I've checked the "network" tab in the Docker-UI and the "bridge"-alternative and I can see the IP-range there but I can't change it?
Thanks.
You can't, it's immutable. Even if you could, containers on such a bridge would behave like they are on a switch that is not connected with the rest of your network.

Instead of tryting to enforce old patterns to docker, I highly recommend to learn and understand docker, and then start doing things the docker way...
 

Shadow

Subscriber
453
158
NAS
DS216+II, DS118, DS718+
Router
  1. RT2600ac
  2. MR2200ac
Operating system
  1. Windows
Mobile operating system
  1. Android
Last edited:
You can. You need to create a docker macvlan network for this. Its slightly complicated and I am not going to share the commands required to do it. I am a container pro (I make my living with it) and I don't like it and I don't use it. There are not many use cases that realy require a macvlan. I am sure others will chip in and share what's needed to get things up and running.

Well as you know I do use macvlan eventough I'm a Docker noob. At first I had the idea the concept is like running a VM, but as a learned more and more about Docker I understand its indeed something VERY different.. But still, it's an amazing platform eventough it gives me a headache.

There is a topic were MACVLans has been discussed, here .
And here some more important information should you want to go the MACVLAN route...
You must also make adequate changes to your LAN network and DHCP settings.

I can point out I probably never really needed macvlan with everything I've been running so far....
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Similar threads

Similar threads

Trending threads

Top