fix(docker): make image entrypoint command-agnostic - #155
Merged
Merged
Conversation
The image entrypoint hard-coded `monocle server`, so `docker run IMAGE <command>` appended the arguments to the server invocation and failed (`error: unexpected argument 'watch' found`) even though the README documented direct subcommand usage. Set ENTRYPOINT to `monocle` and move the default command to CMD, so a bare `docker run` and docker-compose (which sets no `command:`) still start the server while every subcommand is reachable directly.
There was a problem hiding this comment.
🟢 Approval recommended
The changes correctly apply Docker entrypoint semantics while preserving existing default server behavior.
Pull request overview
Makes the Docker image entrypoint command-agnostic while preserving server mode as the default.
Changes:
- Sets
monocleasENTRYPOINTandserverasCMD. - Documents direct Docker subcommand usage.
- Records the fix in the changelog.
File summaries
| File | Description |
|---|---|
Dockerfile |
Separates executable entrypoint from the default command. |
README.md |
Updates Docker usage examples and default behavior. |
CHANGELOG.md |
Documents the entrypoint fix. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
The image entrypoint hard-coded
monocle server(ENTRYPOINT ["monocle", "server"]), sodocker run IMAGE <command>appended its arguments to the server invocation and failed —docker run bgpkit/monocle watch ...returnederror: unexpected argument 'watch' found— even though the README documented direct subcommand usage.The entrypoint is now
monoclewithserveras the default CMD, so defaults are unchanged: a baredocker runanddocker-compose.yml(which sets nocommand:) still start the server, while any subcommand runs directly.The README Docker section documents the pass-through usage and notes that
serveris the default command; the changelog entry is under Unreleased / Bug Fixes.Validation
Image built locally and exercised:
--help,watch --help, andparse --helpprint the CLI's own output; a baredocker runstarts the server with/healthresponding; a 20-second livewatchagainst rrc00 connects and receives its subscription acknowledgement.