I have the latest PMS in a docker container. It is only accessible on the docker host. If I change the network_mode to “bridge”, the predictable happens and it is completely inaccessible, but “host” is hardly any better. In host, it tries to use an ip address associated with the (Mac) bridge100 interface. This isn’t routable even to devices on my home network.
Keep in mind that Docker an MacOS does NOT function the same as it does on Linux. In linux, containers are run in a separate namespace from the host but runs under the same kernel. Docker on MacOS (and Windows) runs in a VM. So host networking is going to be the VM’s network stack and not the MacOS network stack. If you want to use host networking, you will need this VM to have a separate IP on your network and not live in an internal network (I’m not sure if Docker on the Mac is capable of this kind of setup).
I think you need to seriously consider why you are wanting to use Docker on the Mac. It’s not really designed for this.
I’m not using this to be contrary… it’s what I have available. PMS directly on the Mac will eventually mean that PMS can’t upgrade any longer (already had this happen on an older iMac), and my newest is a 2016(?) model where that will happen again. Plus, if I could get it running in a docker container, then the container is portable enough that I could move that to another machine eventually. No where that I’ve seen in the documentation has anything mentioned that Docker-on-Mac was unsuitable, but I’ll take your word for it.
If there are instructions to make this work, I would appreciate having those. Alternatively, it would be nice if you and your coworkers could make it so that Plex was more configurable and I could force it to bind to the correct IP within PMS.
Is this not merely a problem of mapping ports correctly on the container? If I were to do that, couldn’t PMS inside the container continue to think that it was bound to whatever IP address that it wanted? Or would PMS continue to send the 192.168.65.3 ip address and screw up the NAT tunnel stuff?
Docker adds complexity that is often not necessary and the some of the workarounds for pieces (such as the way networking is handled) works differently when you aren’t on Linux. Docker can be used on the Mac but it adds more difficulty (such as host networking not being actual host networking and I think that macvlan is not functional).
Mapping ports to the container has absolutely no bearing on how the network is bound inside the container. It is port forwarding. So you need docker to forward the ports on your mac to the container and if you want access outside of your LAN, you’ll need your router to forward ports to your mac.
The Private: address shown in your first screenshot will always show the IP address inside the container and will never show your Mac’s IP address (because it can’t see it).
Setting the ADVERTISE_IP just sets the Custom server access URLs preference and so you don’t really need to set it past the first run. You really shouldn’t use the ALLOWED_NETWORKS as that essentially eliminates all security for clients on this network.
I do have the ports mapped in docker. Which of those needs to be forwarded from my router to the Mac (running docker)? Is it only 32400? I don’t remember ever doing port forwarding running it natively, was PMS doing upnp while I wasn’t watching?
Would you expect it to start working (over the internet) if that port was forwarded to my router, given the other details I’ve provided? I’ll be able to test this out in a few hours, currently at work.