Floci defaults docker-host to unix:///var/run/docker.sock, which has
no equivalent on native Windows. Since this hardcoded default always
overrides docker-java's own OS-aware detection, every Docker-backed
operation failed at container-start time on Windows with a low-level
socket error — including Lambda-invoked CloudFormation custom
resources such as CDK's Custom::S3BucketNotifications.
When docker-host is still unmodified and DOCKER_HOST isn't set, fall
back to Docker Desktop's named pipe (npipe:////./pipe/docker_engine)
on Windows, mirroring what docker-java already does correctly on its
own. Linux/macOS behavior is unchanged. An explicit docker-host or
DOCKER_HOST always takes priority over the fallback.
Verified end-to-end: a CDK-shaped stack (S3 bucket + Lambda +
Custom::S3BucketNotifications) went from CREATE_FAILED to
CREATE_COMPLETE after this fix.
Fixes#2006.
Pressing 'Open Floci UI' under Podman (docker-socket compat) reports every
failure as a missing image and tells the user to 'docker pull floci-ui' — even
when the image is present. The real causes (an unreachable Docker/Podman socket,
a port clash, a daemon error) are hidden, which is especially confusing on
SELinux hosts where the bind-mounted socket connect fails with
'java.net.BindException: Permission denied'.
Classify the failure in FlociUiManager.describeStartFailure:
- only a genuinely unavailable image (NotFoundException / docker-java's
'Could not pull image: ...' wrapper) keeps the 'docker pull' guidance;
- an unreachable runtime (SocketException/BindException/ConnectException) points
at the socket mount and SELinux relabeling;
- any other daemon error is surfaced as-is (e.g. 'address already in use').
Also fix the Podman docs: use ':z' (shared relabel) rather than ':Z' on the
shared Podman API socket, note it applies to the UI sidecar, and mention the
'--security-opt label=disable' fallback.
Add unit tests for the four classifications.
Adds a 'Running on Podman (rootless)' section to the Docker configuration
docs with the known-working container config, and documents the existing
FLOCI_SERVICES_LAMBDA_DOCKER_HOST_OVERRIDE escape hatch for when Runtime
API host auto-detection picks an unreachable address.
Closes#876
Automatically detect the Docker network of the running Floci container and use it for spawned containers when no explicit Docker network is configured. This lets Lambda containers reach Floci’s Runtime API in Docker Compose setups without requiring users to manually set FLOCI_SERVICES_LAMBDA_DOCKER_NETWORK.
Also update Lambda/Docker docs to clarify the automatic network inheritance behavior.
Tested with:
./mvnw -q -Dtest=ContainerBuilderTest,CurrentContainerNetworkResolverTest,DockerHostResolverTest,ContainerLauncherTest test