pull an oci image from any reg (obsiously) and extract its rootfs to a local dir. handles multiplatform manifests, private regs, and insec http regs.
$ trashdump alpine:edge
$ trashdump -o ./rootfs -p linux/arm64 ghcr.io/some/image:latestgo install github.com/idkmaybedeveloper/trashdump/cmd/trashdump@latesttrashdump uses google/go-containerregistry (crane) under the hood. step by step, it will:
- parse the image reference and resolve it against the registry;
- authenticate using da credentials;
- fetch the image manifest and select platform variant;
- assemble all layers into a single tar via
crane.Export; - extract the tar to the output directory, handling regular files, etc.