Skip to main content

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
Note: --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 --dockerfile or --context

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 images to 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 create with --dockerfile for building images securely on Daytona’s infrastructure

Output


Common Patterns

Create Snapshot from Dockerfile and Use It

Push Local Development Image

Create Snapshot with Multi-file Context

Create High-Performance Snapshot

List and Clean Up Old Snapshots


Dockerfile Best Practices

When creating snapshots from Dockerfiles:

Use Official Base Images

Install Common Development Tools

Set Up Working Directory

Configure User Permissions

Example Development Snapshot

Create the snapshot: