Skip to content

Conversation

@pakar
Copy link

@pakar pakar commented Nov 24, 2025

  • Add --mount-ro, --mount-rw, --gitcheckout flags for different workspace modes
  • Skip SSH requirements for mount modes (only needed for gitcheckout)
  • Remove --rm flag for mount modes to prevent accidental file deletion
  • Add --rebuild flag to force Docker image recreation and updates
  • Update help text with comprehensive mode documentation and examples
  • Implement conditional Docker mounting and SSH configuration per mode
  • Add workspace mode detection and handling in entrypoint script

- Add --mount-ro, --mount-rw, --gitcheckout flags for different workspace modes
- Skip SSH requirements for mount modes (only needed for gitcheckout)
- Remove --rm flag for mount modes to prevent accidental file deletion
- Add --rebuild flag to force Docker image recreation and updates
- Update help text with comprehensive mode documentation and examples
- Implement conditional Docker mounting and SSH configuration per mode
- Add workspace mode detection and handling in entrypoint script
@pakar
Copy link
Author

pakar commented Nov 24, 2025

PR is currently in testing and making a few improvements.

pakar added 12 commits November 24, 2025 02:44
- Add --it flag to get interactive shell in existing gitcheckout containers
- Implement smart container naming: project-name + path hash for consistency
- Add conditional -it flag: only for gitcheckout mode (interactive sessions)
- Remove -it flag for mount modes (non-interactive, resource efficient)
- Add timestamp variable scope fix for all container operations
- Update help text with --it flag documentation and examples
- Implement container detection and shell access logic for debugging
- Support multiple mount instances with unique timestamps
- Maintain consistent container names for gitcheckout mode per project path
- Add workspace modes section (--mount-ro, --mount-rw, --gitcheckout)
- Document --it flag for interactive shell access in gitcheckout containers
- Add --rebuild flag documentation and examples
- Include command reference table with all modes and options
- Update authentication requirements per mode (SSH only for gitcheckout)
- Add advanced usage examples for multiple instances and debugging
- Update troubleshooting section with new flag-specific issues
- Mark completed features in roadmap section
- Provide comprehensive usage examples for all scenarios
- Always allocate -it flag for OpenCode terminal functionality
- OpenCode requires TTY even in non-interactive mount modes
- Previously only allocated TTY for gitcheckout mode, causing terminal issues
- This ensures proper terminal forwarding and OpenCode functionality across all modes
- Set terminal title with project name and mode emoji
- Format: '<emoji> OpenCode Box: <project> (<mode>)'
- Works on Linux with TERM environment variable
- Provides clear visual indication of current session
- Helps users identify multiple terminal windows easily
- Falls back gracefully if terminal title setting fails
- Fix comment to clarify cleanup only runs for --gitcheckout mode
- Cleanup code was already correct (only processes gitcheckout temporary volumes)
- No functional changes, just comment clarification for code clarity
- Add containerStarted flag to track if container actually started
- Prevent cleanup code from running when container never started due to early exit
- Fix ReferenceError: workspaceVolume is not defined during early exit
- Ensure cleanup only runs for gitcheckout mode when container was successfully started
- Set containerStarted = true for mount modes (--mount-ro, --mount-rw)
- Previously only set for --gitcheckout mode
- Prevents cleanup code from running when container never started
- Ensures proper container lifecycle tracking across all workspace modes
- Update comment to 'Clean up temporary volumes' for accuracy
- No functional changes, just comment clarification
- Ensures code clarity and consistency
- Fix accidental removal of cleanup code section
- Restore proper cleanup logic for gitcheckout mode
- Ensure container lifecycle management works correctly
…ython3 to docker-build. WIP, we should have a ~/.config/opencode-box/Dockerfile that is used and allow the user to adapt it to their usecase instead of always including everything
@Sly777
Copy link

Sly777 commented Jan 8, 2026

@filipesoccol is there any plan to merge this one? @pakar

@pakar
Copy link
Author

pakar commented Jan 8, 2026

@filipesoccol Sorry but this became stale. What was left is to clean it up a little bit and add support for a config of what packages to include inside docker-image. What it is still works if you want to cherry-pick some things, but have myself switched to a simpler solution using bubblewrap.
https://github.com/pakar/bubblewrap_opencode

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.

2 participants