Why don't all dockers use container port 80 for the web UI?


Recommended Posts

Since we can now give dockers there own IP I want to do this and use the standard port 80 for web UIs.  But with many dockers even if you change the network type to br0 and set an IP address you still can't change the docker's internal IP port so it can still use a funky port like 5800 (filebot), 8188 (sickrage), etc.  Other dockers that use port 80 include apache, pihole, rutorrent.

 

I understand why this was the case in the "old" world  where you generally used the same IP for all dockers, but does this still have to be the case in the new world where we can have one docker per IP address?

Link to comment

I don't see a reason to bother about what port number Docker uses on the inside - what matters is the port it uses on the outside.

 

Lots of services have been designed with a favorite port number just because they are often used with the same IP as the host and it's then easy for the user to still find the service.

Link to comment
4 hours ago, wayner said:

Since we can now give dockers there own IP I want to do this and use the standard port 80 for web UIs.  But with many dockers even if you change the network type to br0 and set an IP address you still can't change the docker's internal IP port so it can still use a funky port like 5800 (filebot), 8188 (sickrage), etc.  Other dockers that use port 80 include apache, pihole, rutorrent.

 

I understand why this was the case in the "old" world  where you generally used the same IP for all dockers, but does this still have to be the case in the new world where we can have one docker per IP address?

 

Yes, a lot of the applications are hardprogrammed to run on certain ports, or have recommended defaults.  Nothing stopping you changing the external port to 80.  But unless you really really know what you're doing, don't feck around with the internal port

 

EDIT: Sorry just realised you were talking about br0 not bridge.  My bad.

Edited by CHBMB
Link to comment
7 minutes ago, pwm said:

I don't see a reason to bother about what port number Docker uses on the inside - what matters is the port it uses on the outside.

 

Lots of services have been designed with a favorite port number just because they are often used with the same IP as the host and it's then easy for the user to still find the service.

The reason to bother is that it is simpler to forget about ports all together which you can do when a docker uses the default port of 80 for its web UI.  If I create a docker and give it an IP of 192.168.1.200 then I just need to type that address in a browser bar to get to it.  I don't have to worry about a port.  And if I use an entry in a hosts file (or whatever) then I can even use something like "sickrage" as my URL.  But I can't do that when the docker insists on using port 6881 or whatever.

Link to comment
9 minutes ago, CHBMB said:

 

Yes, a lot of the applications are hardprogrammed to run on certain ports, or have recommended defaults.  Nothing stopping you changing the external port to 80.  But unless you really really know what you're doing, don't feck around with the internal port

But I don't thing that changing the external port does anything when you use a network type of br0, does it?

Link to comment
4 minutes ago, wayner said:

The reason to bother is that it is simpler to forget about ports all together which you can do when a docker uses the default port of 80 for its web UI.  If I create a docker and give it an IP of 192.168.1.200 then I just need to type that address in a browser bar to get to it.  I don't have to worry about a port.  And if I use an entry in a hosts file (or whatever) then I can even use something like "sickrage" as my URL.  But I can't do that when the docker insists on using port 6881 or whatever.

 

When you access the containers from the GUI there is no need to remember IP addresses and ports, these are filled-in automatically. Just click on the icon of the container and select WebUI.

 

  • Upvote 1
Link to comment
Just now, bonienl said:

 

When you access the containers from the GUI there is no need to remember IP addresses and ports, these are filled-in automatically. Just click on the icon of the container and select WebUI.

 

True, when going through the unRIAD GUI, but there are times when I may want to go directly to the docker's web URL and/or need to remember ports for doing stuff like port forwarding.

Link to comment

Whenevet you use the host network or custom network mode in Docker, you are talking directly to the port as configured in the application itself. Some applications have a setting to change the port, but some have it hardcoded. So your milage will vary. I doubt if it is worth the effort. Your browser remembers a previously visited URL including port or you add the URL to favorites.

 

Link to comment

Maybe I am looking at this all wrong but I really liked the feature in 6.4 (which I believe you are responsible for - thank you!) that let's you use a different IP for each docker.  The reason I liked this is that it gets confusing to keep track of all sorts of different ports and many of the dockers use variations on port 80 - like 8000, 8080, 6080, 8888, etc.  I thought it would be great to be able to keep the web UI port on all dockers standard at port 80 but change the IP to something else on the subnet.  But I lose this advantage and arguably things are worse when I have to remember both an IP and a port.  I guess the one slight advantage to using separate IPs is that I don't have to worry about port conflicts.

 

So then what advantage is there in using the br0 network type and a separate IP for each docker?

Link to comment

I normally create my own home page - an HTML page with lots of links I want to be able to quickly reach.

 

That home page has a header for each machine I have and under each header is a list of the services on that machine.

 

Quick to reach my wiki or some player functionality on a media player or maybe network statistics for the firewall. If a machine run Plex, then I have a direct link to Plex on the home page.

Link to comment
I normally create my own home page - an HTML page with lots of links I want to be able to quickly reach.
 
That home page has a header for each machine I have and under each header is a list of the services on that machine.
 
Quick to reach my wiki or some player functionality on a media player or maybe network statistics for the firewall. If a machine run Plex, then I have a direct link to Plex on the home page.
Our Heimdall container is good for doing that with.

Sent from my LG-H815 using Tapatalk

Link to comment
57 minutes ago, wayner said:

So then what advantage is there in using the br0 network type and a separate IP for each docker?

 

If you have multiple containers which use the same container port(s), these containers can only work together when port translation is done using bridge mode or use different IP addresses using the custom network br0. The bridge mode solution requires to keep a list of ports in use by the user, while IP addresses can be assigned automatically when using the custom network.

 

Some applications, like for example Plex don't work with port translation and the associated IP address translation, so bridge mode isn't an option for such containers.

 

Another possible advantage of different IP addresses for containers is port forwarding on the router (if needed) points to different addresses as the unRAID system itself, lowering the risk of attack on unRAID itself.

Link to comment

What BRiT said. Most apps are installed into the container from their default repository which can also be used to install the app as bare metal. Also, the bare metal version used the port so the container version uses the same port to keep consistant.

 

Can't you still map the port to 80 on the unRAID side when you use an IP address? I haven't tried it, but I saw port mapping still available when I picked custom and saw the place to enter the IP address.

 

Overall, I don't see the difference between remembering the port number using //tower:xxxx vs remembering the IP address //192.161.1.xxx.

 

 

Link to comment
9 hours ago, lionelhutz said:

Overall, I don't see the difference between remembering the port number using //tower:xxxx vs remembering the IP address //192.161.1.xxx.

Well you can use a hosts file to map IP addresses but you can't use it to map ports.  And I find it easier to keep track of what IP addresses are currently in use as I use fing to manage my LAN.  It can get a little tricky in unRAID to keep track of what ports have been used as the Show used ports (or whatever it is called) in the docker creation screen does not necessarily show all of the ports used.

Link to comment
18 hours ago, BRiT said:

Because the majority of all apps are designed to run outside of Docker containers and need to coexist with other apps.

 

This is the most important point and the one that puts it out of the hands of the docker developers here. None of the people who are making these applications available as dockers are actually the author of these applications, they are just packaging them as dockers. They have to use the port the application developer used.

 

So, now that we are taking that into consideration, it's easy to see there is no point in wishing for something else.

Link to comment

On Windows, I think you could use netsh to change the port using a command like this. Run it as administrator.

 

netsh interface portproxy add v4tov4 listenport=80 listenaddress=192.168.1.100 connectport=8081 connectaddress=192.168.1.1

 

So, when you put the address 192.168.1.100 into your browser, it gets redirected to 19.168.1.1:8081,  assuming 192.168.1.1 is your server.

 

Use the hosts to map 192.168.1.100 to your application name you want to use.

 

Edited by lionelhutz
  • Upvote 1
Link to comment
  • 1 month later...
On 3/28/2018 at 8:17 AM, lionelhutz said:

On Windows, I think you could use netsh to change the port using a command like this. Run it as administrator.

 

netsh interface portproxy add v4tov4 listenport=80 listenaddress=192.168.1.100 connectport=8081 connectaddress=192.168.1.1

 

So, when you put the address 192.168.1.100 into your browser, it gets redirected to 19.168.1.1:8081,  assuming 192.168.1.1 is your server.

 

Use the hosts to map 192.168.1.100 to your application name you want to use.

 

I am looking for the same solution as Wayner... I need some of the dockers to more wife/kid friendly. 

I have some of my dockers on their own IP addresses now (thanks to ver 6.5.0) but hit the same roadblock... some apps, notably PLEX, don't allow changing of the WebGUI port from 32400 to 80, which was the point (for me) of it having it's own IP address.

I run Windows Server 2016 as a VM DNS server, so was hoping to just CNAME PLEX, RADARR, etc to multiple 'wife-friendly' and easy to remember words.

Lionelhutz, do you think this is possible to do using something similar to your method but centrally, on Windows Server to prevent having to configure each client?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.