Skip to content

Report a missing docker executable clearly and add error codes to config flow errors - #98

Merged
gensyn merged 9 commits into
mainfrom
copilot/fix-docker-command-failure
Oct 23, 2026
Merged

gensyn merged 9 commits into
mainfrom
copilot/fix-docker-command-failure

Conversation

Copilot AI commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Adding a container fails with the generic "docker command failed (exit status 1)" when the docker binary isn't on the PATH of non-interactive SSH sessions, as on QNAP and Synology NAS devices. The user gets no hint about the cause or the fix. This PR makes that case explicit and gives each config/options flow error a stable code.

  • Missing executable detection (options_flow.py)

    • Validation now returns a new docker_command_not_found error when <docker_command> ps -q exits with status 127 (shell "command not found").
    • Other non-zero exit statuses still return docker_command_failed.
  • Error messages (strings.json, translations/en.json, translations/de.json)

    • docker_command_not_found tells the user to enter an absolute path such as /usr/bin/docker, or to add docker to the PATH of non-interactive SSH sessions.
    • docker_command_failed is reworded to point at the command and the user's permission to run it.
    • Every flow error is prefixed with a code, [E001] to [E009], so users can quote it in bug reports. The German translations are updated to match.
  • Docs (README.md)

    • New "Error Codes" table covering what each code means and what to do about it. E009 includes the NAS workaround of using the absolute path or symlinking docker into /usr/bin.

Example of the new flow error:

[E009] The docker executable was not found on the remote host. Use the absolute path to the executable (e.g. /usr/bin/docker) or add it to the PATH of non-interactive SSH sessions.

Only config/options flow errors were changed. Abort messages and service exception messages are untouched. No new unit tests cover the exit-status-127 path.

Copilot AI linked an issue Oct 23, 2026 that may be closed by this pull request
Co-authored-by: gensyn <36128035+gensyn@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve user-friendliness of docker error messages Report a missing docker executable clearly and add error codes to config flow errors Oct 23, 2026
Copilot AI requested a review from gensyn October 23, 2026 10:37
Co-authored-by: gensyn <36128035+gensyn@users.noreply.github.com>
Co-authored-by: gensyn <36128035+gensyn@users.noreply.github.com>
Co-authored-by: gensyn <36128035+gensyn@users.noreply.github.com>
@gensyn
gensyn marked this pull request as ready for review October 23, 2026 12:19
Copilot AI balanced review requested due to automatic review settings October 23, 2026 12:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The known-hosts filename heuristic can misclassify missing files and display incorrect recovery instructions.

1 open issue
What changed in this PR

This PR improves SSH Docker setup diagnostics for missing Docker executables, addressing the NAS troubleshooting scenario in #97, and introduces stable error codes.

Changes:

  • Distinguishes exit status 127 and adds missing known-hosts file handling.
  • Adds E001–E010 codes and troubleshooting guidance to English and German flow messages.
  • Documents error codes and corrects the Custom Executables link.
File Description
translations/​en.json Adds coded English errors and recovery guidance.
translations/​de.json Adds matching German errors and guidance.
strings.json Updates source flow messages with error codes.
README.md Documents error codes and fixes an internal link.
options_flow.py Handles missing executables and known-hosts files.

Review effort: Balanced

Comment thread options_flow.py Resolved
@gensyn
gensyn merged commit 05b3262 into main Oct 23, 2026
5 checks passed
@gensyn
gensyn deleted the copilot/fix-docker-command-failure branch October 23, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docker command fails on QNAP NAS

3 participants