April 18, 20242 yr I run a reverse proxy to access my applications running in docker containers. For multiple reasons, I use several different custom docker networks. My reverse proxy needs to be in every one of them. Right now I stop the container switch to the command line add every network to the container start the container I need to do this every time the container gets updated. It would be very useful to add multiple docker networks via UI that get attached every time the container starts.
May 1, 20242 yr This is exactly what I wanted to request as well. Glad I've serched first. I wanted to run a reverse proxy in my local network and its better to have it in at least 2 networks: in a custom docker network and in my local network (so I can access it without using the Unraid's IP and be able to use the 443 an 80 ports)
June 4, 20242 yr I would like to see some improvements to the UI for this, but there IS currently a simpler way than you mentioned: 1. Edit the container 2. Enable “Advanced View” 3. Add the following to “Post Arguments” (replacing the appropriate values): ``` && docker network connect <your network name> <your container name> ``` This will persist across updates.
January 5Jan 5 Brandon Martino - Personal SiteGuide-DockerNetworksBrandon Martino - Personal Site... Edited January 5Jan 5 by bmartino1 read and learn the docker docs.
January 6Jan 6 5 minutes ago, bmartino1 said:use compose file and mange all the newtorks in 1 file....Yes, there are workarounds:You can use Docker Compose to manage the whole docker stackYou can run docker network connect <network-name> <container-name> manuallyYou can add && docker network connect <network-name> <container-name> in Advanced View -> Post ArgumentsAll of them have problems. Docker Compose is not officially supported. There is a plugin that installs docker-compose, but it has no UI support, so containers must always be managed via the shell. Running docker network connect manually does not persist across container restarts.The only somewhat usable workaround is using Post Arguments but it has it's own problems:The network must have been previously created via the shell, there is no user interface to manage docker networksIt's hidden under Advanced ViewIt wasn't designed to run extra commands after the docker run ... <image>. It's purpose is to allow adding arguments after <image> , which are passed to the application running inside the docker container. I had a look at the code and it works by sheer luck due to how the docker run ... command is constructed and executed using popen which runs the command in a sub-shell. I'm not sure if "Post Arguments" can be supplied from a template file, if that's the case that is a whole other can of worms from a security perspective because that would allow shell injection on the host machine (if you were to use an untrusted application template).It's a single line input field. For containers that connect to multiple networks like a reverse proxy, it hard to edit. One minor improvement would be to change this input field to a multi-line input <textarea>), preferably resizable.While the shell and workarounds exist, an official UI would be useful to manage Docker networks and allow containers to attach to multiple networks. Edited January 6Jan 6 by mihaiblidaru
January 6Jan 6 docker copose is a plugin yes, it has ui support but manuly text eidts as is should..looks to me like you don't know how to setup continer name spaces and aliass for your dockers...all in the docker docs..https://docs.docker.com/engine/security/userns-remap/
January 6Jan 6 another trick is to make a internal docker network that user define yes will save and keep .... no start stop disonc cno cli stuff...
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.