Jump to content
Eadword

Allow custom network string for Docker

6 posts in this topic Last Reply

Recommended Posts

Posted (edited)

Currently when you create a new Docker image, you are allowed to set the network to one of `bridge`, `host`, `none`, or a custom bridge. I would like to be able to specify another container such as `--net=container:networkmonitor` for instance. Ultimately docker-compose support would be ideal as hand-constructing container networks can be problematic, but this would be a simple add that makes it much easier in the short term.

Edited by Eadword
typo

Share this post


Link to post

+1

 

specially as when u use `none` it will also not work when specify it in extra parameter cause both will be exec

 

sample when setting to none in docker gui it will

docker exec --net=`none` ....... --net=container:my_container ...

fail

 

only possible here by manually run the docker exec cmd without the --net=`none` and only keep the --net=container:my_container

Share this post


Link to post

+1

I'm currently going through the trial and this is the first thing I haven't been able to do so far. This would be immensely useful, especially if you want a bunch of containers funnel through a single VPN container, rather than having each of those containers create their own VPN connections.

Share this post


Link to post

+1
I had also requested this previously but didn't get much traction then.

Share this post


Link to post

FYI there's a workaround.  I found it via https://ronnieroller.com/unraid.  Basically, you create a network named "container:foo".  This network isn't actually used though.  However, it will appear in the network dropdown, which when you select will generate "--net=container:foo" in the command line.  So, create another docker container named "foo" and you're all set.

Edited by bling

Share this post


Link to post

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.