mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
When Floci runs in Docker, a sidecar it creates that publishes ports (a k3s node, the ECR registry, a Redshift engine, the Floci UI, the AppSync JS runtime) starts on the default bridge and is then connected to its service's network. createAndStart resolves the endpoint on that network. Adopting a surviving container after a restart took the first address in Docker's inspect response instead, which in practice is usually the bridge, and Floci is not on the bridge. Every probe of the adopted container failed; an EKS cluster stayed CREATING. ContainerLifecycleManager.adopt gains an overload that takes the network to prefer and resolves each endpoint with resolveEndpoint(inspect, port, network). Each caller passes the network it creates its container on, through ContainerBuilder.resolveDockerNetwork with the argument it gives withDockerNetwork. A survivor that is not on that network falls back to the first address, as before; the two-argument adopt is unchanged. Co-authored-by: Robin Baeckman <27041454+RobinBaeckman@users.noreply.github.com>