Port range mapping in Docker container setup (Bridge mode)


netman1

Recommended Posts

My application have a port range which needed to map.

However, in Docker container setup -> port mappings, i cannot input port range (e.g. 5000-5100), it prompt "Please enter a number".

I know that Docker support port range mapping, is there any way i can setup this in the web GUI ?

Link to comment

Another option that doesn't use the gui is to use 'pipework' to assign the docker container its own ip.

I have a few of my docker containers set up this way so that I can control the traffic priority with my router.

I'm sure a plugin could be created for gui control pipework, but I haven't heard of anything nor do I have the skill set to make one my self.

Link to comment
  • 5 years later...
On 10/31/2015 at 11:40 PM, Squid said:

not at the moment

Is there any plan to introduce this? From what I understand, the docker run command supports this easily with something like: 

docker run -p 7000-8000:7000-8000

 

but it doesn't sound like the docker template in Unraid allows me to do this.

 

  • Like 1
Link to comment
4 hours ago, frakman1 said:

Is there any plan to introduce this? From what I understand, the docker run command supports this easily with something like: 


docker run -p 7000-8000:7000-8000

 

but it doesn't sound like the docker template in Unraid allows me to do this.

+1, @Squid, the template supports it just fine AFAIK, but the view on the docker container page is not ideal.

It sure would clean up my container page, I have a container that requires about 5 pages of scrolling to get past since each port in the defined range is enumerated individually.

 

The template supports ranges just fine, they just get expanded and fill several pages on the docker advanced view.

      <Port>
        <HostPort>5000-5150</HostPort>
        <ContainerPort>5000-5150</ContainerPort>
        <Protocol>tcp</Protocol>
      </Port>
      <Port>
        <HostPort>5000-5150</HostPort>
        <ContainerPort>5000-5150</ContainerPort>
        <Protocol>udp</Protocol>
      </Port>

image.png.538b9359a26b8988db1a58d055535c7b.png

etc...

etc...

Link to comment
6 hours ago, Squid said:

Actually, what's going on is that the chevron doesn't appear in advanced view... 

 

8 hours ago, jonathanm said:

they just get expanded and fill several pages on the docker advanced view.

Yep, that's what I'm complaining about, but my ideal solution isn't to add the collapsing function, instead just show the range as entered, X-Z/TCP

Link to comment
2 hours ago, jonathanm said:

 

Yep, that's what I'm complaining about, but my ideal solution isn't to add the collapsing function, instead just show the range as entered, X-Z/TCP

I did a PR to have them collapsed.  Maybe in the future I'll swing around and re-look at it to show the range instead.

  • Thanks 1
Link to comment
  • 9 months later...
On 8/10/2021 at 9:30 AM, KoNeko said:

Sure but would be great to beable to add in the template that you can do the multiport thing.

As the post says you can do this no problems in the template.

 

On 8/10/2021 at 9:30 AM, KoNeko said:

Also if the docker is on Custom Br:0 so i can give it a own IP. i cant "redirect" ports like when its on bridge.

You can if you create your own custom bridge network via applicable commands.

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.