Feature Request - Ports Used


Recommended Posts

I think it's fair to say that Docker use has exploded over the last few months enabling all of us to use our machines in ways we never thought possible, easily and quickly configuring applications that would once be plugins that would require dependencies and reworks with each Unraid version.

 

One problem I've begun to notice is that keeping track of which ports are in use is getting exceedingly difficult especially when I'm trying out different versions of containers ie Apache or Nginx and I think it would be a nice feature if there was the functionality to click a tab and it would list the ports currently in use and possibly which app is using it.

 

Not sure how easy or difficult it would be to implement and I realise there is already a column detailing IP and port number on both host and guest but something a bit clearer might be helpful.

 

Thoughts?

Link to comment

I think it's fair to say that Docker use has exploded over the last few months enabling all of us to use our machines in ways we never thought possible, easily and quickly configuring applications that would once be plugins that would require dependencies and reworks with each Unraid version.

 

One problem I've begun to notice is that keeping track of which ports are in use is getting exceedingly difficult especially when I'm trying out different versions of containers ie Apache or Nginx and I think it would be a nice feature if there was the functionality to click a tab and it would list the ports currently in use and possibly which app is using it.

 

Not sure how easy or difficult it would be to implement and I realise there is already a column detailing IP and port number on both host and guest but something a bit clearer might be helpful.

 

Thoughts?

 

what happens currently if you try to add a docker using a port that's already assigned is that it will download from dockerhub and set the folders etc.. and then fail with an error message telling you the port is already assigned.

 

the dot for that docker will be red, you can then look on the docker page at the port mappings column and see which ports are being used .

 

edit the docker with a free port and it will start with no downloading etc...

 

 

Link to comment

I think it's fair to say that Docker use has exploded over the last few months enabling all of us to use our machines in ways we never thought possible, easily and quickly configuring applications that would once be plugins that would require dependencies and reworks with each Unraid version.

 

One problem I've begun to notice is that keeping track of which ports are in use is getting exceedingly difficult especially when I'm trying out different versions of containers ie Apache or Nginx and I think it would be a nice feature if there was the functionality to click a tab and it would list the ports currently in use and possibly which app is using it.

 

Not sure how easy or difficult it would be to implement and I realise there is already a column detailing IP and port number on both host and guest but something a bit clearer might be helpful.

 

Thoughts?

 

what happens currently if you try to add a docker using a port that's already assigned is that it will download from dockerhub and set the folders etc.. and then fail with an error message telling you the port is already assigned.

 

the dot for that docker will be red, you can then look on the docker page at the port mappings column and see which ports are being used .

 

edit the docker with a free port and it will start with no downloading etc...

 

Yes, that's what happens, but I find the current list somewhat cluttered and difficult to read so find myself missing the fact I've already assigned a port.  Admittedly it's no real trouble to do what I normally do and what you have described but just thought a nice feature would be like a list with current ports in use, both in running and not currently running containers.

Link to comment

I think it's fair to say that Docker use has exploded over the last few months enabling all of us to use our machines in ways we never thought possible, easily and quickly configuring applications that would once be plugins that would require dependencies and reworks with each Unraid version.

 

One problem I've begun to notice is that keeping track of which ports are in use is getting exceedingly difficult especially when I'm trying out different versions of containers ie Apache or Nginx and I think it would be a nice feature if there was the functionality to click a tab and it would list the ports currently in use and possibly which app is using it.

 

Not sure how easy or difficult it would be to implement and I realise there is already a column detailing IP and port number on both host and guest but something a bit clearer might be helpful.

 

Thoughts?

In short, this is something we want to do.  Will it make it in for 6.0 final?  No, but I can easily see us putting this on the roadmap for 6.1 or 6.2. This expands beyond just ports. We want to provide a method to manage CPU pinning across containers and VMs the same way.

Link to comment

I think this will give all the docker ports

netstat -lptun | grep docker-proxy

but that will miss ports in use by other processes. You could

netstat -lptun | grep 99

to see if port 99 was already in use by anything.

 

Probably someone with better linux than me could come up with something better.

Link to comment

I think it's fair to say that Docker use has exploded over the last few months enabling all of us to use our machines in ways we never thought possible, easily and quickly configuring applications that would once be plugins that would require dependencies and reworks with each Unraid version.

 

One problem I've begun to notice is that keeping track of which ports are in use is getting exceedingly difficult especially when I'm trying out different versions of containers ie Apache or Nginx and I think it would be a nice feature if there was the functionality to click a tab and it would list the ports currently in use and possibly which app is using it.

 

Not sure how easy or difficult it would be to implement and I realise there is already a column detailing IP and port number on both host and guest but something a bit clearer might be helpful.

 

Thoughts?

In short, this is something we want to do.  Will it make it in for 6.0 final?  No, but I can easily see us putting this on the roadmap for 6.1 or 6.2. This expands beyond just ports. We want to provide a method to manage CPU pinning across containers and VMs the same way.

 

Sounds great, like you've thought of everything. 

Link to comment

I think this will give all the docker ports

netstat -lptun | grep docker-proxy

but that will miss ports in use by other processes. You could

netstat -lptun | grep 99

to see if port 99 was already in use by anything.

 

Probably someone with better linux than me could come up with something better.

 

I'll give this a go when I get home, cheers trurl.

Link to comment

Containers are not shown as "docker" but with the name of the process instead.

 

To see a list of all ports in use do:

 

lsof -Pni | grep LISTEN

 

how do i put that in the address bar of firefox ? lol j/k

 

If you call it putty, you'll be fine  ;)

 

Link to comment

Containers are not shown as "docker" but with the name of the process instead.

 

To see a list of all ports in use do:

 

lsof -Pni | grep LISTEN

 

how do i put that in the address bar of firefox ? lol j/k

 

If you call it putty, you'll be fine  ;)

 

wot's putty precious ?

 

<<< mac user

Link to comment

Containers are not shown as "docker" but with the name of the process instead.

 

To see a list of all ports in use do:

 

lsof -Pni | grep LISTEN

 

how do i put that in the address bar of firefox ? lol j/k

 

If you call it putty, you'll be fine  ;)

 

wot's putty precious ?

 

<<< mac user

 

that's telnet

 

<<< windows user

 

Link to comment

Containers are not shown as "docker" but with the name of the process instead.

 

To see a list of all ports in use do:

 

lsof -Pni | grep LISTEN

 

how do i put that in the address bar of firefox ? lol j/k

 

If you call it putty, you'll be fine  ;)

 

wot's putty precious ?

 

<<< mac user

 

that's telnet

 

<<< windows user

 

i won't hold it against you, lol.

Link to comment

I have another request....

 

In unRAID terminal.... type a command... This launches something like:

 

=============================

          Docker Containers Running

=============================

1. Maria-DB; id:jhgwjhcdwj

2. Sickbeard - id: dd

3. Plex Media Server - id:

4. etc.

 

Type the number of the container:

> 2

=============================

 

One enters the number and the container's terminal starts. AND it types for your  "export TERM=xterm"!!!

 

If I had a nickel for every time I have cut and pasted container ID and term=xterm, I would be driving a yellow Ferrari. And I have been only playing with Dockers for about a week.

 

 

Link to comment

I have another request....

 

In unRAID terminal.... type a command... This launches something like:

 

=============================

          Docker Containers Running

=============================

1. Maria-DB; id:jhgwjhcdwj

2. Sickbeard - id: dd

3. Plex Media Server - id:

4. etc.

 

Type the number of the container:

> 2

=============================

 

One enters the number and the container's terminal starts. AND it types for your  "export TERM=xterm"!!!

 

If I had a nickel for every time I have cut and pasted container ID and term=xterm, I would be driving a yellow Ferrari. And I have been only playing with Dockers for about a week.

 

or just pull request the authors to put in

 

ENV TERM=xterm into their containers at build stage.

 

 

Link to comment
  • 1 month later...

I am prepared to bet that the majority of ports people are presenting in docker land are web interfaces or APIs of some sort.

 

I have said this before but since we have a templating system we can conceivably make this information available in such a way as to have a nginx reverse proxy.

 

This is better that having to deal with weird ass port mappings for a number of reasons but the big ones are extra security, centralized user control (i.e. unRAID users could be used to control access to each docker gui)  and a just far more usable than having to remember all these weird ports.

Link to comment

if 2 dockers use the same container port, is it as simple as changing the port number in the docker's "Port Mappings" section in the webgui?

Don't change the container port, change the host port.

 

Ok, but apps like transmission will report the port as closed. Would it be just a gui thing and the port is actually open?

Link to comment

if 2 dockers use the same container port, is it as simple as changing the port number in the docker's "Port Mappings" section in the webgui?

Don't change the container port, change the host port.

 

Ok, but apps like transmission will report the port as closed. Would it be just a gui thing and the port is actually open?

Not exactly sure what you're getting at but if you are having a problem with the transmission docker, let me know. It was one of the first things I set up in a docker.

 

The host ports are the only things seen outside of the dockers, so whatever a container is using internally doesn't matter outside of the docker. If you map the port the transmission container is using to a different port on the host, then that host port is the port that actually gets used on unRAID, that host port is the port that must not conflict with other ports being used on unRAID, such as the host ports of other dockers, and that host port is the port that must be forwarded by your router if that applies.

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.