Files
floci/src/main/java
Hector Ventura 3771c1e9a2 fix(ecs): assign awsvpc tasks dynamic host ports to avoid collisions (#1785)
In awsvpc mode every AWS task receives its own ENI, so a portMapping's
hostPort carries no host-binding semantics. Floci was publishing it
literally on the single local Docker host, so two tasks of the same
service — or two services sharing a port — collided on start.

awsvpc mappings now get a dynamic host port in native mode, or
expose-only in Docker mode where consumers reach containers via the
docker network IP. bridge and host mode keep publishing hostPort
literally, matching AWS.

Also fix the leak this surfaced: a failed start in
ContainerLifecycleManager.createAndStart left the created container
behind, so retrying callers accumulated Created containers and
fixed-name callers hit name conflicts on the next attempt.

Refs #1778
2026-07-09 23:45:54 -05:00
..