May 1, 201511 yr 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?
May 1, 201511 yr It may already be there, (haven't checked), but if its not for dockerMan to check for port conflicts also.
May 1, 201511 yr 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...
May 1, 201511 yr There is a sort for port mappings page on the dockerman page, but i can't for the life of me fathom what it's sorting by , lol.
May 1, 201511 yr Author 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.
May 1, 201511 yr 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.
May 1, 201511 yr 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.
May 1, 201511 yr Author 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.
May 1, 201511 yr Author 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.
May 1, 201511 yr 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
May 1, 201511 yr 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
May 1, 201511 yr 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
May 1, 201511 yr 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
May 1, 201511 yr 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
May 1, 201511 yr 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.
May 1, 201511 yr 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.
May 1, 201511 yr 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.
May 2, 201511 yr or just pull request the authors to put in ENV TERM=xterm into their containers at build stage. As simple as that....! I just added it to my 2 humble repos. Can't believe other of the big gun Docker makers are not including them....
June 5, 201511 yr To get the host ports already assigned to one of your dockers cat /boot/config/plugins/dockerMan/templates-user/* | grep HostPort | sort
June 5, 201511 yr 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.
June 5, 201511 yr 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?
June 5, 201511 yr 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.
June 5, 201511 yr 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?
June 5, 201511 yr 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.
Archived
This topic is now archived and is closed to further replies.