Files
floci-cli/src/main/java/io/floci
Hector Ventura f6cec794d7 fix(restart): keep the instance's port, image, data directory and services (#49)
* fix(restart): keep the instance's port, image, data directory and services

Without a profile, restart reads the running container's settings (host port, image, the directory mounted at /app/data, its services and resource namespace) before stopping it and starts it with them, instead of falling back to the defaults and moving the instance to the default port without its state. A profile still decides when one is given, and restart now starts the container when none exists instead of failing.

A container started without --persist has Docker's anonymous volume at /app/data; restart took that volume's internal path for a persist directory and failed to start again. Only a bind mount is a persist directory now.

* fix(restart): stop before the stop when the running container's settings cannot be read

A failed or timed-out inspect is no longer treated as a missing container, which removed the instance and started it on the defaults. Adds tests through call() for the missing-container, existing-container and unreadable-settings paths.
2026-10-10 17:38:28 -05:00
..