Docker Namespaces and revised sysctl values? (.e.g net.core.somaxconn)

So I’m running Docker on Ubuntu 22.04 with Namespaces enabled (e.g. “userns-remap”: “default”). I’ve also set my host’s /etc/sysctl.conf with tweaked values to check for a performance issue.

However, it seems when running Docker in Namespace mode, I can’t set any sysctl values as per the docs inside the docker compose file etc. I also can’t query any of these values in the container’s command line - so how do I edit the namespace to inherit the host’s values? Do these inherit the host’s values, I don’t think so…

There simply must be a way but my Googling power have revealed zero clues. I cannot believe everyone out there is running namespaces with default somaxconn values, but maybe they are? Anyone?

Client: Docker Engine - Community
Version: 27.3.1
buildx: Docker Buildx (Docker Inc.)
Version: v0.17.1
compose: Docker Compose (Docker Inc.)
Version: v2.29.7