Documentation Index
Fetch the complete documentation index at: https://ona.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Requires Core plan or higher.
How it works
-
Hash computation: When starting an environment, Ona computes a hash from the Dev Container configuration, including:
- Contents of
devcontainer.json - Contents of any referenced
Dockerfile - Digest of any existing container image referenced directly in
devcontainer.json
- Contents of
-
Cache lookup: Ona checks whether an image with this hash already exists:
- If found, Ona pulls and uses the cached image
- If not found, Ona builds a new image, pushes it to the cache, then uses it
- Shared caching: The cache is shared across all users within a project. The first team member who starts an environment with a new Dev Container configuration builds and caches the image. Later environments in the same project with the same configuration use the shared cached image.
Non-project environments, such as environments started directly from a context URL, do not use the cache.
Enable or disable the cache
For supported runners, configure the cache in runner settings:- Go to Settings -> Runners in your Ona organization
- Select your runner
- Toggle Dev container image cache
- Click Save
Disabling the cache prevents new images from being cached and stops existing environments from pulling from the cache on rebuild. Existing cached images remain in the provider registry until they expire after 30 days or are manually deleted.
What gets cached
The cache includes the built image from adevcontainer build of your configuration:
- Base image layers: Your specified base image and any modifications
- Dev container features: Configured Dev Container features
- Build steps:
RUN,COPY, and other Dockerfile instructions - Tool installations: Package managers, development tools, and dependencies installed during the build
- Lifecycle hooks such as
onCreateCommand, which run after the environment starts - User-specific configuration applied at runtime
- Files that change after container creation
Cache invalidation
A new image is built and cached when:- The Dev Container configuration hash changes
devcontainer.jsonchanges- A referenced
Dockerfilechanges - The digest of an image referenced directly in
devcontainer.jsonchanges - The cached image expires
- The cached image is manually deleted from the provider registry
devcontainer.json directly references an existing image, Ona includes the image digest in the cache key:
devcontainer.json builds from a Dockerfile, Ona tracks the Dockerfile contents. Base images referenced in FROM instructions are not monitored directly, so change the Dockerfile or delete the cached image when you need to force a rebuild for base image updates.
Force a new image build
To force rebuilding and re-caching an image, change the configuration hash or delete the cached image from the provider registry.Modify Dev Container configuration
Add or modify content indevcontainer.json:
Modify the Dockerfile
If your Dev Container builds from a Dockerfile, change the Dockerfile:Delete the provider registry image
Delete the cached image tag from the AWS ECR or Google Artifact Registry repository for the project. The next environment creation rebuilds and caches the image.Supported configurations
Supported:- Standard Dev Container configurations with a Dockerfile or direct image reference
- Dev Container features from any registry
- Ona Cloud
- AWS runners
- GCP runners
- Docker Compose-based Dev Containers
- Non-project environments, such as environments started directly from a context URL
Monitoring
Cache hits are logged during environment creation:Security model
The Dev Container image cache is project-scoped:- Project isolation: Cached images are only available to environments in the same project
- Hash-based reuse: Images are reused only for matching Dev Container configurations
- Limited push access: Push credentials are granted only during the initial environment build
- Pull-only refreshes: Existing environments receive refreshed pull credentials, not push credentials
- Temporary credentials: Registry credentials are short-lived and scoped to the project cache repository
Provider details
Ona Cloud
Ona Cloud includes Dev Container image caching by default. Ona manages the backing registry, lifecycle policy, and credentials.AWS runners
AWS runners store cached images in Amazon ECR in your AWS account. Cached image repositories use this naming pattern:- Upgrade your CloudFormation stack to a version that supports the cache
- Go to Settings -> Runners in your Ona organization
- Select your AWS runner
- Toggle Dev container image cache
- Click Save

- Images are stored in Amazon ECR in the same AWS region as the runner
- ECR repositories inherit tags from the CloudFormation stack for cost allocation
- Repository tags are immutable
- Images expire after 30 days
- Registry access uses AWS IAM temporary credentials
GCP runners
GCP runners store cached images in Google Artifact Registry in your Google Cloud project. Cached image repositories use this naming pattern:gitpod-cache-{runnerID} repository in Artifact Registry. The same Dev container image cache runner setting controls whether project environments receive cache registry credentials.
GCP storage and access details:
- Images are stored in Artifact Registry
- The Artifact Registry repository uses Docker format
- Repository tags are immutable
- Images expire after 30 days
- Registry access uses temporary Google Cloud access tokens
Troubleshooting
Cache not working
Cache not working
If images are not being cached:
- Check runner configuration: Ensure the Dev Container image cache is enabled in runner settings
- Check the environment type: Non-project environments do not use the cache
- Check provider infrastructure: For AWS, verify the CloudFormation stack version and ECR permissions. For GCP, verify Terraform-managed Artifact Registry permissions
- Check runner logs: Look for cache-related errors in CloudWatch for AWS runners or Cloud Logging for GCP runners
- Review environment logs: Look for cache-related error messages
- Check image digest warnings: If using the
imagefield, look for digest lookup warnings that might indicate network or authentication issues with base image registries
Slow startup despite cache
Slow startup despite cache
If environments are still slow to start:
- Check cache hit logs: Look for “Using pre-built dev container” in environment logs
- Check image size: Large images take longer to pull
- Check Dev Container mode: Docker Compose-based Dev Containers are not supported by the cache
- Review lifecycle hooks: Lifecycle hooks such as
onCreateCommandare not cached and may install tools that increase startup time. Move stable setup steps into the Docker build where possible - Verify project-based environment: Non-project environments do not use the cache