Skip to main content
Version: 1.1.0

blobber cp

Copy a file from an OCI image to a local path.

Synopsis​

blobber cp <reference> <path> <destination> [flags]

Description​

Copies a single file from an OCI registry image to a local path. Uses eStargz format to download only the requested file, not the entire image. Parent directories are created automatically if they don't exist.

Arguments​

ArgumentRequiredDescription
referenceYesOCI image reference (e.g., ghcr.io/org/repo:tag)
pathYesPath to the file within the image
destinationYesLocal file path to write to

Flags​

FlagTypeDefaultDescription
--insecureboolfalseAllow connections without TLS
-v, --verboseboolfalseEnable debug logging

Output​

No output on success. Errors are printed to stderr.

Exit Codes​

CodeDescription
0Success
1Error (image not found, file not found, auth failed, write failed)

Examples​

Copy a file to the current directory:

blobber cp ghcr.io/myorg/config:v1 app.yaml ./app.yaml

Copy a nested file:

blobber cp ghcr.io/myorg/config:v1 config/database.yaml ./database.yaml

Copy to a new directory (created automatically):

blobber cp ghcr.io/myorg/config:v1 app.yaml ./output/configs/app.yaml

Notes​

  • Path must match exactly as shown in blobber ls
  • Existing files are overwritten without warning
  • Parent directories are created with mode 0755
  • Binary files are copied as-is

See Also​