TechnitiumSoftware / DnsServer

Technitium DNS Server
https://technitium.com/dns/
GNU General Public License v3.0
3.86k stars 403 forks source link

[Docker] Deployment error when network is set to host mode #696

Closed brokoler closed 11 months ago

brokoler commented 11 months ago

Hello,

I want to use the Technitium docker container on my Unraid server with the existing IP of my server in host mode. When deploying Technitium with the Network set to host mode I get following error:

90859379b9106b08f0d5fb985c4334f7dce52f660feb137efd6495509094a67b docker: Error
response from daemon: failed to create shim task: OCI runtime create failed:
runc create failed: sysctl "net.ipv4.ip_local_port_range" not allowed in host
network namespace: unknown.

This doesn't happen when instead the Network is set to "Bridged", but in this case the container doesn't receive a local IP in my network and creating a scope only shows IP 0.0.0.0.

Could someone help me to get this running with the network type set to host mode? Thanks and kind regards

brokoler commented 11 months ago

Just googled a bit, seems to be related to this: https://github.com/opencontainers/runc/issues/2693

This is described in the official Docker documentation:
If you use the --network=host option using these sysctls that beginning with net.* are not allowed.

Would be great if a future fix would be planned.

ShreyasZare commented 11 months ago

Thanks for the feedback. You need to remove the sysctls config from the docker-compose file when using the host mode.

Just try that and it should work.

brokoler commented 11 months ago

Indeed I was able to remove it from the template, even if it was a little complicated with Unraid :) Thanks for your support and your great software!

brokoler commented 11 months ago

Closed

ShreyasZare commented 11 months ago

Good to know that it worked.

ExXxtr3me commented 5 months ago

Indeed I was able to remove it from the template, even if it was a little complicated with Unraid :) Thanks for your support and your great software!

Could you help me out? Have the same problem, how did you remove it in unraid? In my template there is no entry for it that i could remove.

ShreyasZare commented 5 months ago

Indeed I was able to remove it from the template, even if it was a little complicated with Unraid :) Thanks for your support and your great software!

Could you help me out? Have the same problem, how did you remove it in unraid? In my template there is no entry for it that i could remove.

@ExXxtr3me Check the the docker-compose.yml file that you are using. You need to remove the sysctls config from the docker-compose file when using the host mode.

ExXxtr3me commented 5 months ago

Thanks, I found it now, it's under the extra arguments in unraid, had to switch to the advanced view to see them. 👍