- Symptom
- curl localhost:3000 on the Mac is refused while the container logs show the server listeningPort mappings are discarded when the service uses host networking
- Cause
- On Docker Desktop, host networking means the Linux VM's network unless the opt-in host networking feature is on. That feature needs Desktop 4.34 or later, works only at layer 4 for Linux containers, and is off by default.
- Fix
- Publish ports with -p or ports instead of host networking, or turn the feature on in settings on 4.34 or later.
- Apply
Docker Desktop > Settings > Resources > Network > Enable host networking > Apply and restart- Affected
- Docker Desktop for Mac and Windows; unsupported before 4.34, opt-in from 4.34 (2024)
- Sources
Last verified 2026-10-15 · Confirmed by 0 builders