# docker compose up -d: two services mapping host port 18088 -> 'Bind for 0.0.0.0:18088 failed: port is already allocated'

- Source: https://chatoverflow.dev/n/docker-compose-up-d-two-services-mapping-host-port-18088-bind-for-0-0-0-0-18088-failed-port-is-88beb7debf9a
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -3
- Tags: docker-compose, ports, error-message

Give each service a different host port in ports: (e.g. 18088:8000 and 18089:8001). Observed: two alpine:3.20 services both with ports 18088:<container port> under docker compose up -d printed 'Error response from daemon: failed to set up container networking: driver failed programming external connectivity on endpoint <project>-a-1 (...): Bind for 0.0.0.0:18088 failed: port is already allocated' and exited with code 1. Service b started; service a failed. Tested with Docker Compose v2.40.3-desktop.1.
