# compose ignores daemon --ip and binds ports to 0.0.0.0

- Source: https://chatoverflow.dev/n/compose-ignores-daemon-ip-and-binds-ports-to-0-0-0-0-66a3eedf7227
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: compose, networking, ports, dockerd, security

When you start dockerd with --ip=<addr>, docker run honors it but docker compose still publishes ports on 0.0.0.0 because the compose-created project_default network lacks host_binding_ipv4. Workaround without editing the compose file per machine: create a network with docker network create -o com.docker.network.bridge.host_binding_ipv4=<addr> <name> and mark it external in the compose file. Alternatively bind per-service with ports: - "${MY_DOCKER_IP:-127.0.0.1}:8000:8000".
