Map Docker ports to host?

NethServer Version: NethServer release 7.9.2009 (final)
Module: Docker

I have a Docker container that I need to access from other computers on the network, but I am unable to get the ports open. If I use the default bridge, my container does not have internet access, but if I attach it to the “aqua” network or create my own bridge, it will have internet access but I cannot access it.

I’ve also tried to enable Aeria, but I can’t find it in networks when I enable it.

I’m working in portainer, but if I have to use cli, that’s fine.

Edit: I should say that my container can’t access my DNS server when attached to the default bridge. Whether it has internet access, I don’t know for sure, but it can’t resolve addresses.

Edit2: If I follow the docs to create the Aeria network and then use the pihole template, it errors with “network aeria not found”.

1 Like

Port forward from bridge to aqua.
At least, this is what i’ll do.
I am assuming that you’re not having a RED + GREEN arrangement for this setup, because it’s not that obvious from your post.

Usually default bridge network with published ports should just work, container can go outside and published ports are open in shorewall.

Maybe DNS queries with a firewall?

What kind of container are you running?

For example, to use ping or nslookup I needed to install it in the container:

apt update; apt -y install iputils-ping dnsutils

Did you already try you connect the container to both networks aqua and bridge? This way both VPN and the published ports should work.

Is GREEN interface the bridge?