Skip to content

Alpine#26

Open
Sakujakira wants to merge 8 commits intoJafner:mainfrom
Sakujakira:alpine
Open

Alpine#26
Sakujakira wants to merge 8 commits intoJafner:mainfrom
Sakujakira:alpine

Conversation

@Sakujakira
Copy link
Copy Markdown

Summary

This PR migrates the project from Debian to Alpine Linux with significant improvements in security, size, and maintainability.

Key Improvements

Image Optimization:

  • ✅ 3.6× smaller image size (77 MB vs 279 MB)
  • ✅ 3.6× fewer packages (62 vs 224)
  • ✅ 68% fewer total CVEs (55 vs 173)
  • ✅ 71% fewer critical CVEs (2 vs 7)

Security Enhancements:

  • ✅ Apache worker processes run as non-root (PUID/PGID)
  • ✅ Apache-native privilege dropping via User/Group directives
  • ✅ Proper file ownership timing (after all git operations)
  • ✅ Minimal attack surface (git, jq, su-exec only)
  • .dockerignore prevents sensitive files in build context

Bug Fixes:

  • ✅ Fixed Apache config syntax error (printf with proper newlines)
  • ✅ Fixed file ownership issues after git clone
  • ✅ Improved git operations (git reset --hard + pull)
  • ✅ Idempotent user/group creation for container restarts
  • ✅ Idempotent git submodule handling

Infrastructure:

  • ✅ Multi-arch support (linux/amd64, linux/arm64) with QEMU/buildx
  • ✅ Updated to 5etools-mirror-3 repositories
  • ✅ Updated image references to ghcr.io/sakujakira

Documentation:

  • ✅ Added CLAUDE.md with comprehensive implementation details
  • ✅ Added README comparison section with Docker Scout CVE data
  • ✅ Added security section documenting privilege separation
  • ✅ Added AI-assisted development disclaimer
  • ✅ Updated PUID/PGID documentation

Testing

All changes have been verified with:

  • ✅ Local Docker builds successful
  • ✅ Apache config syntax validated (httpd -t)
  • ✅ Container runs and passes healthcheck
  • ✅ File ownership verified for custom PUID/PGID
  • ✅ HTTP service responds correctly (200 OK)
  • ✅ Apache processes verified (master as root, workers as non-root)

Breaking Changes

None. The container interface remains the same with backward-compatible environment variables.

Migration Notes

Users can simply pull the new image - no configuration changes required. Existing volumes will be updated on first run.


🤖 Generated with assistance from Claude Code

Sakujakira and others added 8 commits February 14, 2026 17:12
…e fixes

Major improvements:
- Migrate base image from Debian to Alpine Linux 3.20 (3.6x smaller, 68% fewer CVEs)
- Implement Apache-native privilege dropping (workers run as PUID:PGID non-root)
- Fix file ownership timing (chown after all git operations)
- Fix Apache config syntax (printf with proper newlines)
- Improve git operations (git reset --hard + pull, idempotent submodule handling)
- Add multi-arch support (linux/amd64, linux/arm64) with QEMU/buildx setup

Security enhancements:
- Apache worker processes run as non-root (PUID/PGID)
- Proper file permissions for htdocs and logs directories
- Minimal package installation (git, jq, su-exec only)
- Add .dockerignore to prevent sensitive files in build context

Repository updates:
- Update from 5etools-mirror-2 to mirror-3 repositories
- Update image references to ghcr.io/sakujakira/5etools-docker

Documentation:
- Add CLAUDE.md with comprehensive implementation details and verification checklist
- Add README comparison section with Docker Scout CVE data
- Add security section documenting privilege separation
- Add AI-assisted development disclaimer
- Update PUID/PGID documentation with runtime behavior

Testing:
- All changes verified with local builds and runtime testing
- Apache config syntax validated
- File ownership confirmed for custom PUID/PGID
- Healthcheck verified

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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.

1 participant