1
0
Fork 0
mirror of https://github.com/imjasonh/krust synced 2026-07-15 09:55:49 +00:00
Commit graph

6 commits

Author SHA1 Message Date
Jason Hall
d56bae42de
Merge branch 'main' into repro 2025-10-15 16:09:27 -04:00
Jason Hall
72dc9ef103 reproducible
Signed-off-by: Jason Hall <jason@chainguard.dev>
2025-10-15 16:05:23 -04:00
Jason Hall
f324904eaa improve test coverage
⏺ Test coverage improved from 47.65% to 50.14% (+2.49%).

  Coverage improvements by module:

  - resolve: 54.7% → 89.8% (+35.08%)
  - image: 46.6% → 57.7% (+11.14%)
  - config: 69.2% → 80.0% (+10.77%)
  - builder: 51.1% → 52.8% (+1.70%)

Signed-off-by: Jason Hall <jason@chainguard.dev>
2025-10-15 15:35:28 -04:00
Jason Hall
9dc786c3f1
feat: replace vendor/oci-distribution with direct OCI Distribution Spec implementation
Replace the vendor/oci-distribution dependency with a custom implementation
that directly follows the OCI Distribution Specification using hyper for HTTP.

Key improvements:
- Direct HTTP implementation using hyper, hyper-util, and hyper-tls
- Support for Bearer token, Basic auth, and Anonymous authentication
- Cross-registry blob copying for layered images
- Multi-platform manifest list support
- Better error handling and redirect support
- Reduced dependency footprint

Technical changes:
- Remove vendor/oci-distribution dependency
- Add hyper ecosystem dependencies for HTTP client
- Implement OCI types: OciDescriptor, OciImageManifest, OciImageIndex
- Add ImageReference parsing with registry/repository/tag/digest support
- Implement registry authentication flows (Bearer token requests)
- Add blob upload/download with redirect handling
- Support manifest pulling with image index resolution
- Fix manifest size validation for Docker compatibility
- Update integration tests to use new registry auth types
- Handle docker.io redirect to registry-1.docker.io correctly

This enables more flexible authentication handling and reduces external
dependencies while maintaining full OCI compliance.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-08 22:25:10 -04:00
Jason Hall
e0df56704a
fix: implement cross-registry layer copying for layered images
Resolves GitHub issue #28 by implementing proper layered image building
that preserves base image properties and handles cross-registry scenarios.

Changes:
- Enhanced push_layered_image() to detect cross-registry pushes and copy base layers
- Implemented automatic blob copying from source registry to destination registry
- Always use layered approach instead of falling back to single-layer builds
- Added verification tests to ensure base image environment and files are preserved
- Consolidated unit tests into module files for better organization

This fixes "MANIFEST_BLOB_UNKNOWN" errors when pushing layered images that
reference base image blobs from different registries (e.g., cgr.dev → ttl.sh).

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-08 21:41:13 -04:00
Jason Hall
5e89023925
Initial commit: krust - container image build tool for Rust
krust builds container images for Rust applications without Docker:
- Builds static binaries using musl libc
- Creates minimal OCI container images
- Pushes to any OCI-compliant registry
- Outputs digest to stdout for composability

Inspired by ko.build for Go applications.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-07 20:46:08 -04:00