Run isaac-sim container with --net=host ,can not access the services inside the container

ubuntu20.04
docker version is 26.0.0

can not access the services inside the container with this cmd:
docker run --name isaac-sim --entrypoint bash -it --runtime=nvidia --gpus all -e “ACCEPT_EULA=Y” --rm --network=host
-e “PRIVACY_CONSENT=Y”
-v ~/docker/isaac-sim/cache/kit:/isaac-sim/kit/cache:rw
-v ~/docker/isaac-sim/cache/ov:/root/.cache/ov:rw
-v ~/docker/isaac-sim/cache/pip:/root/.cache/pip:rw
-v ~/docker/isaac-sim/cache/glcache:/root/.cache/nvidia/GLCache:rw
-v ~/docker/isaac-sim/cache/computecache:/root/.nv/ComputeCache:rw
-v ~/docker/isaac-sim/logs:/root/.nvidia-omniverse/logs:rw
-v ~/docker/isaac-sim/data:/root/.local/share/ov/data:rw
-v ~/docker/isaac-sim/documents:/root/Documents:rw
nvcr.io/nvidia/isaac-sim:4.0.0

but it work with this:
docker run --name isaac-sim --entrypoint bash -it --runtime=nvidia --gpus all -e “ACCEPT_EULA=Y” --rm
-p 47995:47995
-p 47996:47996
-p 47997:47997
-p 47998:47998
-p 47999:47999
-p 48000:48000
-p 48001:48001
-p 48002:48002
-p 48003:48003
-p 48004:48004
-p 48005:48005
-p 48006:48006
-p 48007:48007
-p 48008:48008
-p 48009:48009
-p 48010:48010
-p 48011:48011
-p 48012:48012
-p 49000:49000
-p 49001:49001
-p 49002:49002
-p 49003:49003
-p 49004:49004
-p 49005:49005
-p 49006:49006
-p 49007:49007
-p 49100:49100
-e “PRIVACY_CONSENT=Y”
-v ~/docker/isaac-sim/cache/kit:/isaac-sim/kit/cache:rw
-v ~/docker/isaac-sim/cache/ov:/root/.cache/ov:rw
-v ~/docker/isaac-sim/cache/pip:/root/.cache/pip:rw
-v ~/docker/isaac-sim/cache/glcache:/root/.cache/nvidia/GLCache:rw
-v ~/docker/isaac-sim/cache/computecache:/root/.nv/ComputeCache:rw
-v ~/docker/isaac-sim/logs:/root/.nvidia-omniverse/logs:rw
-v ~/docker/isaac-sim/data:/root/.local/share/ov/data:rw
-v ~/docker/isaac-sim/documents:/root/Documents:rw
nvcr.io/nvidia/isaac-sim:4.0.0

why the option “–net=host” doesn’t work?
please help, thanks

Hi. What services are not able to access? I’m guessing it is because of your docker setup or firewalls on your system.

The --network=host flag is useful to allow all network interfaces and ports being able to be accessed by the container.