Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(monocore): implement initial
mc pull
functionality (#132)
* feat(monocore): implement initial image pull functionality - Add pull_image command to monocore CLI - Implement DockerRegistry pull_image functionality - Add stub for SandboxesRegistry pull_image - Add monoimage module for Sandboxes Registry integration - Update OCI reference parsing to handle digests - Add database migrations for image and layer tracking - Remove Lock subcommand from MonocoreSubcommand enum * feat(moncore): implement Docker image layer extraction - Add layer extraction functionality to save downloaded layers - Update database schema for layer chains and configs - Add existence checks for images and layers to prevent re-downloads - Improve logging with more detailed information - Remove full_json storage from configs table - Rename layer_stacks to layer_chains for better semantics - Make Reference struct fields settable for registry fallback * feat(core): implement OCI layer handling and filesystem metadata management This commit adds support for handling OCI container image layers and improves filesystem metadata management across the codebase. Key changes include: - Add rootfs.rs module for OCI layer handling with support for: - Creating monofs filesystems from OCI layers - Merging multiple layers following OCI layer semantics - Handling whiteouts and opaque directories - Preserving Unix metadata (mode, uid, gid, timestamps) - Refactor filesystem metadata handling: - Move Unix metadata constants to shared location - Remove redundant symlink depth tracking - Improve permission handling during filesystem operations - Filesystem metadata structure has changed with the removal of symlink_depth field - Update dependencies: - Upgrade rand to 0.9.0 - Add async-recursion workspace dependency - Add monofs dependency to monocore * feat(image): implement monofs layer creation and merging for Docker images This commit adds functionality to create and merge monofs layers from pulled Docker container images. Key changes include: - Add new DB functions for saving/updating image and layer CIDs - Implement monofs layer creation from extracted OCI layers - Add layer merging to create final rootfs from ordered layers - Update image pulling to store CIDs and verify layer completeness - Add helper functions for layer CID management and verification - Add tests for Docker image pulling and nginx file verification - Add CID error handling to MonocoreError enum The changes enable proper storage and tracking of monofs layers in the database, with verification of layer completeness and proper merging order.
- Loading branch information