Overview
Snapshot commands allow you to create and manage reusable sandbox images. Snapshots define the base environment for your sandboxes, including the operating system, installed packages, and configuration.daytona snapshot create
Create a new snapshot from a Dockerfile or base image.Usage
Flags
Image Source (one required)
--dockerfile,-f- Path to Dockerfile to build--image,-i- The image name for the snapshot
--dockerfile and --image are mutually exclusive.
Build Context
--context,-c- Files or directories to include in the build context (can be specified multiple times). If not provided, context will be automatically determined from COPY/ADD commands in the Dockerfile
Container Configuration
--entrypoint,-e- The entrypoint command for the snapshot- Note: Cannot be used with
--dockerfileor--context
- Note: Cannot be used with
Resource Defaults
--cpu- CPU cores that will be allocated to sandboxes using this snapshot (default: 1)--memory- Memory that will be allocated to sandboxes in GB (default: 1)--disk- Disk space that will be allocated to sandboxes in GB (default: 3)
Region
--region- ID of the region where the snapshot will be available (defaults to organization default region)
Examples
Output
When building from a Dockerfile, build logs are displayed in real-time:daytona snapshot list
List all available snapshots.Usage
Flags
--page,-p- Page number for pagination (starting from 1, default: 1)--limit,-l- Maximum number of items per page (default: 100)--format- Output format (json, yaml)
Examples
Output
Displays a table with:- Snapshot ID
- Name
- State (Active, Building, Failed, etc.)
- Resources (CPU, Memory, Disk)
- Created date
daytona snapshot delete
Delete one or more snapshots.Usage
Flags
--all,-a- Delete all snapshots
Examples
Output
daytona snapshot push
Push a local Docker image to Daytona as a snapshot.Usage
Flags
--name,-n- Specify the Snapshot name (required)--entrypoint,-e- The entrypoint command for the image--cpu- CPU cores that will be allocated to sandboxes (default: 1)--memory- Memory that will be allocated to sandboxes in GB (default: 1)--disk- Disk space that will be allocated to sandboxes in GB (default: 3)--region- ID of the region where the snapshot will be available
Examples
Requirements
- Docker must be installed and running locally
- The image must exist locally (use
docker imagesto verify) - The image must be compatible with AMD architecture (x86_64)
Notes
- The image is pushed to Daytona’s registry with a timestamp-based tag
- The command waits until the image is validated and the snapshot is active
- Use
daytona snapshot createwith--dockerfilefor building images securely on Daytona’s infrastructure