Check system requirements before initialization#51868
Merged
thaJeztah merged 2 commits intomoby:masterfrom Jan 20, 2026
Merged
Conversation
Move checkSystem() call from inside NewDaemon() to cli.start() to validate system requirements earlier in the startup process. Signed-off-by: hiroto.toyoda <[email protected]>
thaJeztah
reviewed
Jan 19, 2026
daemon/command/daemon.go
Outdated
Comment on lines
+117
to
+120
| // Verify platform-specific requirements before proceeding with daemon initialization | ||
| if err := daemon.CheckSystem(); err != nil { | ||
| return fmt.Errorf("system requirements not met: %w", err) | ||
| } |
Member
Contributor
Author
There was a problem hiding this comment.
Great catch! You're absolutely right - checking in newDaemonCLI() is better because it also validates system requirements when running dockerd --validate.
b0c8ff7
I've updated the PR to move CheckSystem() to newDaemonCLI() (right after TLS config setup). This way, the validation happens for all commands and provides immediate feedback.
Thank you for the suggestion! 🙏
Move CheckSystem() call to newDaemonCLI() for earlier validation of platform-specific requirements. Signed-off-by: hiroto.toyoda <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
- What I did
Resolved the TODO in
daemon/daemon.go:814by moving thecheckSystem()call from insideNewDaemon()to an earlier point in the startup process (cli.start()indaemon/command/daemon.go).This ensures platform-specific system requirements are validated before any daemon initialization begins.
Related to TODO added in 17fb29c.
- How I did it
checkSystem()as a public functionCheckSystem()in the daemon packagedaemon.CheckSystem()indaemon/command/daemon.go'scli.start()function, right after debug mode is enabled and before any resource allocationcheckSystem()call from insideNewDaemon()The changes ensure:
- How to verify it
Build and run:
On unsupported systems (e.g., Windows < build 17763), daemon fails immediately with system requirements error before any resource allocation.
- Human readable description for the release notes
System requirement errors on Windows are now reported immediately on startup, before resource allocation.
- A picture of a cute animal (not mandatory but encouraged)
