-
Notifications
You must be signed in to change notification settings - Fork 9
Set VNC_PORT and NO_VNC_PORT for multiple containers with host networking #4
Comments
Thank you for reporting this issue. Before I'll check it, could you try also the newer images from the repository accetto/xubuntu-vnc-novnc please? |
So,
and by building both When I start the second one (
|
Both containers work fine if I run the second one as:
I don't see why I need to specify a different |
I suppose this has to do with unix sockets being on the same network namespace ( |
So I've tested it and I can confirm your observations. I think, that you've found the best solutions for this particular special scenario. The problem is really related to running the containers on the host's network ( You do not mention, why do you need to use the host's network, but if it's really not avoidable, then I find your proposal reasonable. Unfortunatelly, I'll not be able to implement it for these older containers any time soon, because I'm currently concentrating on the next generation of headless containers. They will be based on Ubuntu 20.04 LTS and they will use the newest version of TigerVNC server, which by the way, uses completely different startup procedure. For the case, that you would have time to test your proposal, you can check, for example, this question on stackoverflow. I really appreciate that you've tested this special scenario and that you've shared your solution. |
This is indeed an edge case. I am building a custom image on top of yours containing software it's protocol only works with host networking. I think vncserver's port should be updated just for consistency's sake and just close this this issue since there is a workaround if someone else needs it. Your images are great. Can't wait using the new versions |
Thank you. You've probably already noticed it yourself, but for the case just as tips: You can start containers also with You can also bind the startup directory to avoid building the image after each change in the docker run -it --rm --name foo --network host \
-v $PWD/src/startup:/dockerstartup \
accetto/ubuntu-vnc-xfce-firefox --skip bash Then you can start the startup script manually like If you wish, we can add your alternative solution to the repository. Feel free to send a pull request any time. By the way, what do you think about merging the |
You are already using all vncserver related variables so setting the port looks like the right choice and yes mounting part of or all the source is a useful way to move fast while developing. If by merging together you refer to something similar with what you've done on
(these are just personal preferences) |
Thank you for your feedback. These are exactly the points that led me to the splitting some time ago. However, after adding the third generation of images it could become confusing, so I'm considering merging each generation to one GitHub repository. |
Hello @ykontekakis, I've just released a new generation of containers based on Ubuntu 20.04 LTS. You can find it on GitHub and in the following three repositories on Docker Hub - accetto/ubuntu-vnc-xfce-g3, accetto/ubuntu-vnc-xfce-chromium-g3 and accetto/ubuntu-vnc-xfce-firefox-g3. Unfortunatelly I had no time to test your particular scenario, but maybe you'll find it useful anyhow. So have a look and let me know if it works for you. Regards, |
I need to use multiple containers with host networking but I am facing two issues:
ubuntu-vnc-xcfe
repo in order to bind the vncserver on the VNC_PORT:accetto/ubuntu-vnc-xfce
andaccetto/ubuntu-vnc-xfce-firefox
and successfully start the first container as follows:but the 2nd one fails as follows:
If I stop the first container and then run the second command it works fine. I cannot see any port clashing and I am running out of ideas. Can you please advise on this issue ?
The text was updated successfully, but these errors were encountered: