Commit Graph

9 Commits

Author SHA1 Message Date
193662fb67 fix: configure Docker containers to run as current user
- Added user mapping (UID:GID) to Docker Compose services to prevent root-owned files
- Export current user's UID/GID in build.sh for Docker Compose
- Enhanced clean build to handle permission issues gracefully:
  * Try normal cleanup first
  * Fallback to container-based cleanup for root-owned files
  * Ultimate fallback to sudo if needed
- Added cleanup for all Docker volumes (build, source, kernel, target caches)

Fixes 'Permission denied' errors when cleaning output files created by Docker containers.
2025-08-22 18:47:31 +02:00
948a10a3ce feat: add binary optimization with strip and upx compression
- Added upx package to Dockerfile.alpine build dependencies
- Added optimize_binary() function to compile-components.sh
- Automatically strips debug symbols from all Zero-OS binaries
- Applies UPX compression with --best --lzma for maximum size reduction
- Optimizes binaries in both initramfs and output directories
- Shows size reduction stats (original → stripped → compressed)
- Graceful fallback if UPX fails, keeping stripped version

This significantly reduces initramfs size by compressing zinit, rfs, and mycelium binaries.
2025-08-22 16:43:43 +02:00
e3db295eb9 Add static OpenSSL libraries for Rust musl builds
- Add openssl-libs-static package to both Dockerfiles
- Add pkgconfig for proper SSL library detection
- Fixes mycelium compilation error with missing -lssl and -lcrypto
2025-08-16 20:38:45 +02:00
1bc6005a48 Fix cargo availability in dev-shell environment
- Add cargo to PATH in dev-shell service
- Add target-cache volume for Rust build caching
- Use login shell to properly source cargo environment
- Keeps existing build infrastructure and caching strategy
2025-08-16 20:35:13 +02:00
653c751535 Lots of fixes
details
  details
  details
2025-08-16 00:52:30 +02:00
a3e56b9eeb Fix components mount: remove read-only for cargo build access 2025-08-15 23:19:36 +02:00
829f7d034e Add components volume mount to docker-compose services 2025-08-15 22:45:41 +02:00
f1829141a3 Update Rust build system: use rustup with musl target for static builds 2025-08-15 22:44:19 +02:00
9b14d94bbe Initial commit: Alpine Zero-OS initramfs build system with cleaned Docker configuration 2025-08-15 22:11:44 +02:00