Commit 8315c7e
committed
feat: add Docker build support with local cache and custom image
Add comprehensive Docker build infrastructure for both CLI and GUI
builds with dependency caching and optimized build times.
Changes:
Docker Infrastructure:
- Add Dockerfile with pre-installed GUI build dependencies
- Base: rust:latest
- Includes: libdbus-1-dev, pkg-config, libxkbcommon-dev, wayland, xcb
- Image size: 2.34GB (600MB compressed)
- Add .dockerignore to optimize build context
- Excludes: target/, bin/, .cache/, .git/, docs/
Makefile:
- Add docker-image target to build custom Docker image
- Add build-docker target for CLI builds using Docker
- Uses local .cache directory for cargo registry and git cache
- Mounts as user to avoid permission issues
- Build time: ~12s (with cache)
- Add gui-build-docker target for GUI builds using Docker
- Uses same cache as CLI builds
- No runtime dependency installation needed
- Build time: ~54s (with cache)
- Update help documentation for new Docker targets
Build Cache:
- Add .cache directory for persistent cargo package cache
- Separate subdirectories: .cache/registry and .cache/git
- Shared between CLI and GUI builds
- Avoids re-downloading packages on each build
- Add .cache/ to .gitignore
CLAUDE.md:
- Enhanced architecture documentation with detailed patterns
- Add layered architecture flow diagrams
- Document critical architectural patterns:
- Trait-based abstraction for testing without hardware
- Validated domain types pattern
- Error hierarchy and propagation
- No-panic guarantee in library code
- Dry-run pattern for safe testing
- Add GUI architecture section (Elm Architecture/TEA pattern)
- Add complete workflow for adding new commands
- Add detailed file structure documentation
- Add GUI commands to quick reference
Benefits:
- Fast, reproducible builds on any system with Docker
- No need to install Rust or build dependencies on host
- Consistent build environment across machines
- Package cache persistence reduces build times
- Clean separation of build dependencies1 parent 4c35f48 commit 8315c7e
5 files changed
+614
-208
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
0 commit comments