ghcr.io or quay.io, or a local caching proxy.
How it Works
When you ask BoxLite to create a box from an image (e.g.,image="alpine"), it needs to resolve this “unqualified” reference into a full image reference (e.g., docker.io/library/alpine:latest).
By default, if no registries are configured, BoxLite uses docker.io (Docker Hub) as the implicit default.
You can provide a list of custom registries. BoxLite will try to pull the image from each registry in the provided order. The first successful pull wins. If all registries fail, the operation returns an error.
Fully qualified image references (e.g.,
quay.io/prometheus/prometheus:v2.40.1) always bypass the search mechanism and are pulled directly.CLI Configuration
The CLI layers configuration sources with the following priority (from lowest to highest):- Default:
docker.io - Configuration File (
--config): Loads configuration from the specified path - CLI Flags (
--registry): Prepended to registries from config file (highest priority)
1. Configuration File
Create a JSON configuration file with your registry preferences:image_registries field is optional. It contains a list of registries to search for unqualified image references.
2. Using the Configuration File
Use the--config flag to specify your configuration file:
3. Command Line Flags
You can use the global--registry flag with boxlite run or boxlite create. You can specify it multiple times.
These flags are prepended to your configured list. This allows you to force a specific registry to be checked first for a single command without editing your config file.
SDK Configuration
The SDKs are “pure” by design. They do not automatically load any configuration file. This ensures that your code’s behavior is deterministic and does not silently depend on the user’s local environment.- Programmatic Options: You explicitly pass the list of registries when initializing the runtime.
- Default:
docker.io(if you pass an empty list or nothing).
- Python
- Node.js
Advanced: Loading Config in SDKs
If you want your SDK application to respect a configuration file, you can manually load it. This puts the control in your hands.- Python
- Node.js
Registry Resolution Order
To summarize the full resolution order for CLI usage:Check if the image reference is fully qualified
If the image reference includes a registry domain (e.g.,
quay.io/prometheus/prometheus:v2.40.1), pull directly from that registry. Skip all other steps.Try CLI --registry flags (highest priority)
If
--registry flags were provided, try each one in order.Try registries from configuration file
If a
--config file was specified and it contains image_registries, try each one in order.Private Registry Authentication
BoxLite uses an OCI-compliant image puller that respects the system’s Docker credential store. If your registry requires authentication, configure credentials through Docker’s standard mechanism.Configure credentials
Usedocker login to store credentials for your private registry:
~/.docker/config.json at image pull time. No additional BoxLite-specific configuration is needed.
Credential helpers (e.g.,
docker-credential-osxkeychain on macOS, docker-credential-ecr-login for AWS) are supported. BoxLite invokes the same credential lookup chain that Docker uses.Verify access
Troubleshooting
Image not found (404)
Image not found (404)
Verify the image reference is correct and the image exists in the registry:Common causes:
- Typo in the image name or tag
- The image is in a different registry than expected (check your
image_registriesorder) - The image was deleted or the tag was overwritten
Timeout pulling large images
Timeout pulling large images
Large images (multi-GB) can exceed default pull timeouts, especially on slow connections. BoxLite caches image layers, so subsequent pulls of the same or similar images are faster.Tips:
- Use slim or alpine-based images where possible (e.g.,
python:sliminstead ofpython:latest) - Pre-pull images before running time-sensitive workloads:
boxlite pull my-image:latest - Use a local registry mirror or caching proxy to reduce network latency
TLS certificate errors
TLS certificate errors
If your private registry uses a self-signed or corporate CA certificate:BoxLite uses the system’s TLS trust store for registry connections.
Authentication failed (401/403)
Authentication failed (401/403)
Verify your credentials are stored correctly:If using a credential helper, ensure it is installed and working:

