You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The blob command group provides operations on OCI blobs stored in a registry.
Blobs are the raw content objects (image layers, config objects, arbitrary
artifact payloads) that are referenced by manifests.
All subcommands target a specific blob by registry/repository and digest. The
--repo option uses the registry/name format (registry hostname embedded
in the repository path); no tag suffix is accepted.
Usage: regshape blob [OPTIONS] COMMAND [ARGS]...
Subcommands
Command
Description
head
Check blob existence and retrieve metadata
get
Download a blob to a file or inspect its metadata
delete
Delete a blob from the registry
upload
Upload a blob (monolithic or chunked)
mount
Mount a blob from another repository
Usage
regshape blob [OPTIONS] COMMAND [ARGS]...
Manage blobs in an OCI registry.
Options:
--help Show this message and exit.
Commands:
delete Delete a blob from the registry.
get Download a blob and verify its digest.
head Check blob existence and retrieve metadata.
mount Mount a blob from another repository.
upload Upload a blob to a repository.
Repository Reference Format
--repo accepts the format registry/name, where registry is the registry
hostname (with optional port) and name is the repository path:
No tag suffix (:<tag>) and no digest suffix (@sha256:...) are accepted
in --repo. The digest is always provided separately via --digest.
Subcommands
blob head
Check whether a blob exists in the registry and retrieve its metadata without
downloading any content.
Options
Option
Short
Type
Default
Description
--repo
-r
TEXT
required
Repository in registry/name format
--digest
-d
TEXT
required
Blob digest in algorithm:hex format (sha256:...)
Behavior
Resolve credentials for the registry embedded in --repo.
Issue HEAD /v2/{name}/blobs/{digest}.
Construct a BlobInfo from the response headers.
Print a JSON object containing the blob metadata to stdout.
Exit 0 on success.
Exit Codes
Code
Condition
0
Blob exists; metadata written to stdout
1
Blob not found (404)
1
Authentication error
1
Any other error (network, registry error)
Examples
# Check existence and print metadata
regshape blob head --repo registry.example.com/myrepo --digest sha256:abc123
# Short flags
regshape blob head -r registry.example.com/myrepo -d sha256:abc123
Error: Blob not found: registry.example.com/myrepo@sha256:abc123
Auth failure
Error: Authentication failed for registry.example.com
Registry error
Error: Registry error for registry.example.com/myrepo
blob get
Download a blob and verify its digest. When --output is provided the blob
content is streamed to that file path. When --output is omitted the blob
metadata is printed to stdout without saving the content to disk; this
behaves the same as blob head and is useful for scripts that only need
the metadata after verifying the blob is accessible.
Options
Option
Short
Type
Default
Description
--repo
-r
TEXT
required
Repository in registry/name format
--digest
-d
TEXT
required
Blob digest (sha256:...)
--output
-o
PATH
None
File path to write blob content to
--chunk-size
INT
65536
Streaming chunk size in bytes (ignored without --output)
Behavior
Resolve credentials for the registry.
Issue GET /v2/{name}/blobs/{digest}.
If --output is provided: stream the response body to the file at
--output in --chunk-size byte increments, computing a running
SHA-256 digest as each chunk is written.
After the last byte is written, compare the computed digest against
--digest. If they differ: delete the partial file and exit 1 with
an error message.
If --output is not provided: read the response body fully into memory,
verify the digest, and discard the content.
Print the blob metadata JSON to stdout and exit 0.
Exit Codes
Code
Condition
0
Blob downloaded (or verified) and metadata written to stdout
1
Blob not found (404)
1
Digest mismatch after download
1
Authentication error
1
Output path is not writable
1
Any other error
Examples
# Download a layer to disk
regshape blob get \
--repo registry.example.com/myrepo \
--digest sha256:abc123 \
--output ./layer.tar.gz
# Verify blob exists and print metadata without saving content
regshape blob get \
--repo registry.example.com/myrepo \
--digest sha256:abc123
# Use a larger chunk size for a faster download
regshape blob get \
--repo registry.example.com/myrepo \
--digest sha256:abc123 \
--output ./layer.tar.gz \
--chunk-size 1048576
Error: Blob not found: registry.example.com/myrepo@sha256:abc123
Not supported
Error: Operation not supported by this registry
Auth failure
Error: Authentication failed for registry.example.com
blob upload
Upload a blob from a local file. By default uses the monolithic upload
protocol (POST + PUT). When --chunked is specified, uses the chunked upload
protocol (POST + N×PATCH + PUT), which is required for very large blobs or
registries that do not support monolithic uploads.
Both modes verify the confirmed digest returned by the registry against
--digest before reporting success.
Options
Option
Short
Type
Default
Description
--repo
-r
TEXT
required
Repository in registry/name format
--file
-f
PATH
required
Local file to upload
--digest
-d
TEXT
required
Expected digest of the blob (sha256:...)
--media-type
TEXT
application/octet-stream
Content-Type for the blob
--chunked
FLAG
False
Use chunked (streaming) upload protocol
--chunk-size
INT
65536
Chunk size in bytes (chunked mode only)
Behavior (monolithic, default)
Resolve credentials for the registry.
Read --file fully into memory.
Issue POST /v2/{name}/blobs/uploads/ to initiate the session.
Issue PUT <upload-url>?digest={digest} with the file content as body.
Confirm the Docker-Content-Digest response header matches --digest.
Print a JSON summary to stdout and exit 0.
Behavior (chunked, --chunked)
Resolve credentials for the registry.
Open --file as a binary stream.
Issue POST /v2/{name}/blobs/uploads/ to initiate the session.
Loop: read --chunk-size bytes, issue PATCH <upload-url> with
Content-Range header; advance the session offset.
When the source is exhausted, issue PUT <upload-url>?digest={digest}
with an empty body.
Confirm the Docker-Content-Digest response header matches --digest.
Error: Authentication failed for registry.example.com
blob mount
Mount a blob from another repository in the same registry, avoiding a
full upload when the registry supports cross-repository blob mounting.
A 201 Created response indicates the mount succeeded. A 202 Accepted
response indicates the registry does not support mounting or cannot access
the source repository; the operation exits 1 with a message directing
the caller to use blob upload instead.
Options
Option
Short
Type
Default
Description
--repo
-r
TEXT
required
Destination repository in registry/name format
--digest
-d
TEXT
required
Blob digest (sha256:...)
--from-repo
TEXT
required
Source repository name (without registry prefix)
Behavior
Resolve credentials for the registry.
Issue POST /v2/{name}/blobs/uploads/?from={from-repo}&mount={digest}.
On 201 Created: print a JSON summary to stdout and exit 0.
On 202 Accepted: print an error message to stderr and exit 1 —
the registry did not perform the mount; the caller must upload the blob
directly.
On any other status: call the error helper and exit 1.
Exit Codes
Code
Condition
0
Blob mounted successfully (201 Created)
1
Registry did not accept the mount (202 Accepted)
1
Source blob not found
1
Authentication error
1
Any other error
Examples
# Mount a layer from another repository
regshape blob mount \
--repo registry.example.com/targetrepo \
--digest sha256:abc123 \
--from-repo sourcerepo/myimage