-
Notifications
You must be signed in to change notification settings - Fork 0
Add comprehensive rockerc.yaml examples and documentation #136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Addresses issue #120 by creating a specification for comprehensive example configuration files that demonstrate YAML syntax, available options, and common use cases. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Created examples/ directory with 6 example configurations: * basic.yaml - Simple starter configuration * advanced.yaml - Feature-rich development setup * dockerfile.yaml - Using custom Dockerfile * global-config.yaml - System-wide defaults * vscode.yaml - VS Code optimized configuration * blacklist.yaml - Extension exclusion patterns - Added comprehensive examples/README.md documenting: * Complete configuration syntax reference * All available extensions and their purposes * Configuration hierarchy and merge behavior * CLI integration and override patterns * Common development patterns * Troubleshooting guide - Updated main README.md with links to examples Addresses issue #120 by providing clear documentation of YAML syntax, demonstrating how rocker CLI arguments translate to YAML configuration, and documenting quirks and limitations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Reviewer's GuideAdds a new examples/ directory with multiple rockerc.yaml example configurations and an extensive configuration guide, and updates the main README to link to these resources; also includes internal spec/plan docs describing the examples work. Sequence diagram for rockerc config loading and container startupsequenceDiagram
actor Developer
participant Rockerc as rockerc
participant ConfigLoader as ConfigLoader
participant Rocker as rocker
participant Docker as docker
Developer ->> Rockerc: run rockerc with optional args
Rockerc ->> ConfigLoader: load ~/.rockerc.yaml
ConfigLoader -->> Rockerc: GlobalConfig
Rockerc ->> ConfigLoader: load ./rockerc.yaml
ConfigLoader -->> Rockerc: ProjectConfig
Rockerc ->> Rockerc: merge args lists
Rockerc ->> Rockerc: apply extension-blacklist
Rockerc ->> Rockerc: apply CLI overrides and extra extensions
Rockerc ->> Rocker: invoke rocker with merged config
Rocker ->> Docker: create or reuse container
Docker -->> Rocker: container id
Rocker -->> Rockerc: container ready
Rockerc -->> Developer: attached shell or VS Code session
File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey - I've found 1 issue, and left some high level feedback:
- Consider removing or relocating
specs/24/yaml-examples/plan.mdfrom the main repo if it’s only an internal implementation note, as checked-in planning documents can easily become stale and confuse users browsing the tree. - In
examples/README.md, the list of extensions (e.g.,claude,codex,gemini,homebrew) should match the actual supported rocker/rockerc extensions; if some are not real extensions, it would be clearer to either remove them or explicitly label them as hypothetical examples. - There is some overlap between configuration explanations in the top-level
README.mdandexamples/README.md; to reduce future drift, you might factor shared concepts into a single location and link to it from the other file.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider removing or relocating `specs/24/yaml-examples/plan.md` from the main repo if it’s only an internal implementation note, as checked-in planning documents can easily become stale and confuse users browsing the tree.
- In `examples/README.md`, the list of extensions (e.g., `claude`, `codex`, `gemini`, `homebrew`) should match the actual supported rocker/rockerc extensions; if some are not real extensions, it would be clearer to either remove them or explicitly label them as hypothetical examples.
- There is some overlap between configuration explanations in the top-level `README.md` and `examples/README.md`; to reduce future drift, you might factor shared concepts into a single location and link to it from the other file.
## Individual Comments
### Comment 1
<location> `examples/blacklist.yaml:29` </location>
<code_context>
+ - cuda # No CUDA support needed
+
+# How blacklist works:
+# 1. Global config (~/.rockerc.yaml) might have: [user, pull, git, x11, nvidia]
+# 2. Project config (this file) has args: [user, pull, git, cwd, pixi]
+# 3. Merged args before blacklist: [user, pull, git, x11, nvidia, cwd, pixi]
</code_context>
<issue_to_address>
**suggestion:** The example global args here use `nvidia`, but the dedicated global-config example later uses `cuda`, which may confuse users.
In this walkthrough, the global config uses `nvidia`, while `examples/global-config.yaml` uses `cuda` for GPU support. To avoid confusion for users copying from both, consider standardizing on one extension name or explicitly documenting the difference if both are valid.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #136 +/- ##
==========================================
- Coverage 69.05% 63.04% -6.02%
==========================================
Files 8 9 +1
Lines 1506 1840 +334
==========================================
+ Hits 1040 1160 +120
- Misses 466 680 +214 🚀 New features to boost your workflow:
|
- Removed examples/vscode.yaml (redundant with main documentation) - Added examples/intel-gpu.yaml demonstrating device mounting for Intel GPU - Updated documentation with 'devices' field reference - Added Intel GPU example to both README files Addresses feedback from issue #120 comment showing Intel GPU mounting pattern. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Updated basic.yaml with comprehensive core extension set: * pull, persist-image, x11, user, cwd * git, git-clone, ssh, ssh-client - Updated all other examples to include the core extensions: * advanced.yaml - Added core extensions with comments * intel-gpu.yaml - Added core extensions * dockerfile.yaml - Added core extensions (pull auto-removed note) * global-config.yaml - Updated to include core extensions * blacklist.yaml - Updated to demonstrate excluding core extensions - Updated examples/README.md: * Configuration hierarchy examples updated with core extensions * Common patterns updated to show core extensions baseline - Updated project rockerc.yaml with core extensions This establishes a consistent baseline of core functionality across all examples, making it clearer what extensions are recommended for most use cases. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Removed `~/.ssh` volume mount from advanced.yaml since SSH is already handled by ssh/ssh-client extensions - Replaced with data directory mount example: `/data:/workspace/data` - Added `shm-size: 2g` to demonstrate shared memory configuration (useful for PyTorch, Chrome, multiprocessing applications) - Updated examples/README.md: * Removed SSH volume mount examples from volume field documentation * Added note that SSH is handled by extensions * Updated examples to show data directories and config files * Added `shm-size` field documentation with use cases This eliminates confusion about redundant SSH mounting and showcases more appropriate volume mount use cases. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Corrected descriptions for git, git-clone, ssh, and ssh-client extensions based on their actual behavior from rocker and deps_rocker: - git: Use the global Git settings from the host (not "install git") - git-clone: Install git, git-lfs, and ca-certificates for cloning - ssh: Forward SSH agent into the container (not "SSH server") - ssh-client: Install openssh-client and mount ~/.ssh directory Updated in all files: - examples/basic.yaml - examples/advanced.yaml - examples/intel-gpu.yaml - examples/dockerfile.yaml - examples/global-config.yaml - examples/README.md (Available Extensions section) - rockerc.yaml (project config) These descriptions now accurately reflect what the extensions do rather than what users might assume they do. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Removed examples/README.md to reduce documentation maintenance burden - Updated main README.md to remove reference to examples/README.md - Simplified examples section description - Example YAML files are self-documenting with inline comments This streamlines the documentation by keeping configuration examples in the YAML files themselves where they're most useful. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Summary
rockerc.yamlfiles demonstrating common configurationsChanges
New Example Files
examples/basic.yaml- Simple starter configurationexamples/advanced.yaml- Feature-rich development setupexamples/dockerfile.yaml- Using custom Dockerfileexamples/global-config.yaml- System-wide defaultsexamples/vscode.yaml- VS Code optimized configurationexamples/blacklist.yaml- Extension exclusion patternsDocumentation
examples/README.md- Complete configuration reference with:README.mdwith links to examplesAddresses
Closes #120
Test Plan
pixi run format,pixi run ruff-lint)🤖 Generated with Claude Code
Summary by Sourcery
Add example rockerc.yaml configurations and comprehensive configuration documentation, and link them from the main README.
New Features:
Enhancements:
Documentation: