Confusion around docker networks


Dal

Recommended Posts

Hi.

I'm in the process of setting up Unraid + docker for the first time. And coming from the network world, I find it confusing.

If I want to setup SWAG as a network proxy, it would be natural in my mind to set up two networks on that container; one for the outside (host network, probably) and one for the inside.

I made a drawing to show what I'm after:
 

image.png.5fcde61ac73280def5faf8635c80e07b.png
 

That way I can hinder that Nextcloud and PHPMyadmin (as an example) and their SQL database is not exposed to anything other than SWAG.

But after reading a lot, this does not seem to be common practice when it comes to docker? Unraid doesn't even support more than one network initially on it's containers.

 

I'm confused.

What is common or recommended practice to solve things like this?

 

Thanks.

Link to comment
44 minutes ago, Dal said:

But after reading a lot, this does not seem to be common practice when it comes to docker?

Actually such a network configuration is very common when it comes to microservice containers. The reason it may not seem to be as common with docker is that much of the containerization community has "moved on" from docker when it comes to managing multicontainer apps to more feature rich container orchestration tools like kubernetes (note moved on is a bit over the top as docker still underpins many of the orchestrators). 

 

44 minutes ago, Dal said:

Unraid doesn't even support more than one network initially on it's containers.

So to the heart the issue, the unRAID platform integrated docker as a means to gain easily installable and sandboxed applications. The unRAID webui is focused primarily on supporting single container applications. Thusly there has been little need to support more complex networking schemes in the interface. That said, under the hood it is just docker and additional networks can be attached to a docker container with the docker cli. If you are determined to step beyond unRAIDs single container paradigm i suggest looking into the docker compose plugin for unRAID (full disclosure I maintain it).  

Edited by primeval_god
Link to comment

Thanks for answering.

And thanks for clear up a few things for me. Good to know that such network configuration is still viable.

19 minutes ago, primeval_god said:

If you are determined to step beyond unRAIDs single container paradigm i suggest looking into the docker compose plugin for unRAID (full disclosure I maintain it).  

Excellent news!

Is it this one?

image.png.76712c2d35a52c6df9368560785cfee6.png

 

Thanks again

  • Like 1
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.