Docker WebUI button disappears for container with network set to another container


Go to solution Solved by voyager12,

Recommended Posts

I'm trying to get a docker container to route its internet traffic through another docker container exactly as is described in this SpaceinvaderOne video:

 

 

However, when I follow the video, all containers that are using the vpn container lose their "WebUI" button on the docker tag of Unraid. The WebUI is still accessible by typing in the URL manually into my browser, but I'm trying to figure out how to get the buttons back.

 

To summarize the main points of the video:

1. I specify --net=container:<container-name> on all containers that I want to route through another container

2. the vpn container must expose the ports that the sub-containers are publishing on to be able to access them

3. The vpn container must allow local connections on its iptables. I've done this manually and know it works because I can access the webui by manually typing in the URL of the container (with port) and it resolves.

 

The default WebUI values that I see in the sub-container's docker templates are along the lines of http://[IP]:[PORT:<WebUIPort>] where <WebUIPort> is replaced with the container's (not necessarily the host mapping that you specify in the template) published port. I've tried these variations:

 

1. http://<ip-of-unraid-server>:<external-accessible-port-of-container>

2. http://<ip-of-unraid-server>:<internal-port-of-container>

2. http://[IP]:[PORT:<internal-container-port>]/

3. http://[IP]:[PORT:<external-accessible-port-of-container>]/

 

Where all angle brackets are replaced with their literals by me and not unraid.

Link to comment
  • Solution

So I was able to fix my problem. The WebUI link generation is in /usr/local/emhttp/plugins/dynamix.docker.manager/include/DockerClient.php. I just wrote a user script that patches the link generation that just allows a manual, user-specified WebUI if all other methods fail. I was going to try to put in a PR to contribute the fix upstream at github.com/limetech/dynamix.git, but that repo hasn't been touched since 2016. Also, the version there is different from the version on 6.9.2. I'm not sure which is more up-to-date as I don't have the date on the version in 6.9.2, though interestingly enough, the one on github looks like it wouldn't have this problem. Did limetech take the code to closed source or is there another place that the code is hosted?

  • Like 1
Link to comment
  • 8 months later...
  • 4 weeks later...
On 9/6/2022 at 8:52 PM, JTerryy said:

I have the same issue as you but I still don't understand how you were able to fix it. Did you enter that line in the empty space or somewhere else?

I'm sorry it's taken me so long to respond. I intended to try to publish my fix; however, my server is currently down for maintenance to fix unrelated problems and so I don't currently have access to what I did. I will publish what I did once it is back up and running.

 

As a summary, I just use a user script to modify the relevant php file to patch the fix I need. Ideally I could make a plugin that does this to make it easier to distribute but we'll see if I prioritize that.

Edited by voyager12
type in last sentance
Link to comment
  • 4 weeks later...
On 9/6/2022 at 8:52 PM, JTerryy said:

I have the same issue as you but I still don't understand how you were able to fix it. Did you enter that line in the empty space or somewhere else?

I just reinvestigated this and it looks like this was fixed upstream. Earlier I mentioned the github.com/limetech/dynamix.git repo and that does indeed look to be an old version of the package. Limetech currently uses: github.com/limetech/webui for their repo and in that repo I found this commit: https://github.com/limetech/webgui/commit/d57affd193d4feef700421ce4e527ee3a1a33e18 which looks to have fixed the issue.

 

I don't think this commit was deployed on Unraid 10.3 but it's likely in 11.0 or 11.1. I'll have to test it out when I decided to upgrade my Unraid version.

 

Edit: can confirm that this is fixed in Unraid 6.11.1 at least

Edited by voyager12
Add status of 6.11
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.