Skip to content

Images

Images are pre-configured templates containing all dependencies, tools and environment settings you need inside of your Daytona Sandbox. Daytona supports all standard Docker or OCI compatible images.

Creating Images

When spinning up a Sandbox, Daytona uses a simple image with some useful utilities pre-installed, such as python, node, pip as well as some common pip packages. More information below.

It is possible to override this behavior and create custom Images by visiting the Dashboard, clicking on Images and on Create Image.

You may enter the name and tag of any publicly accessible image from Docker Hub such as alpine:3.21.3 and debian:12.10 or from another public container registry - e.g. my-public-registry.com/custom-alpine:3.21.

The entrypoint field is optional and if your image hasn’t got a long-running entrypoint, Daytona will ensure sure that the resulting container won’t exit immediately upon creation by automatically running sleep infinity.

Once the image is pulled, validated and has an Active state, it is ready to be used. Define the CreateSandboxParams object to specify the custom image to use:

Terminal window
params = CreateSandboxParams(image="alpine:3.21.3", language="python")
sandbox = daytona.create(params)

Full example:

from daytona_sdk import Daytona, CreateSandboxParams
daytona = Daytona()
sandbox = daytona.create(CreateSandboxParams(
image="alpine:3.21.3",
language="python"
))
response = sandbox.process.code_run('print("Sum of 3 and 4 is " + str(3 + 4))')
if response.exit_code != 0:
print(f"Error running code: {response.exit_code} {response.result}")
else:
print(response.result)
daytona.remove(sandbox)

Images from Private Registries

To use an Image that is not publicly available, you need to start by adding the image’s private Container Registry:

  1. Go to the Registries page in the Dashboard
  2. Click the Add Registry button.
  3. Input the Registry’s name and URL, username, password, project, and submit
  4. Once the Container Registry is created, you may go back to the Images page
  5. When creating a new private Image, make sure to input the entire Image name, including the registry location and project name - my-private-registry.com/<my-project>/custom-alpine:3.21

The next step is the same; simply set the CreateSandboxParams field to use the full image name and no more authentication is needed.

Using a Local Image

In order to avoid having to manually set up a private container registry and push your image there, the Daytona CLI allows you to push an image from your local device or from a local Dockerfile and use it in your Sandboxes.

After running docker images and ensuring the image and tag you want to use is available use the daytona image push command to add the image to Daytona, e.g.:

Terminal window
daytona image push custom-alpine:3.21

If you haven’t built the desired image yet, you can use the --dockerfile flag to pass the path to the Dockerfile you want to use and let the CLI do the rest:

Terminal window
daytona image push trying-daytona:0.0.1 --dockerfile ./Dockerfile
Building image from /Users/idagelic/docs/Dockerfile
Step 1/5 : FROM alpine:latest
...
Successfully pushed dfile-try:0.1.0 to Daytona
⡿ Waiting for the image be validated ...
...
✓ Use 'harbor-transient.internal.daytona.app/daytona/dfile-try:0.1.0' to create a new sandbox using this image

This approach also ensures that the resulting image is for the AMD architecture which is the architecture we use when spinning up Daytona Sandboxes.

Deleting Images

Deleting your custom Images is a straightforward process. Simply go to the Images page and click on the Delete button that shows up when clicking the three dots at the end of a row of the Image you want removed.

Default Image

The default image used by Daytona contains python, node and their respective LSP’s, as well as these pre-installed pip packages:

  • beautifulsoup4 (v4.13.3)
  • django (v5.1.7)
  • flask (v3.1.0)
  • keras (v3.9.0)
  • matplotlib (v3.10.1)
  • numpy (v2.2.3)
  • openai (v1.65.4)
  • opencv-python (v4.11.0.86)
  • pandas (v2.2.3)
  • pillow (v11.1.0)
  • pydantic-ai (v0.0.35)
  • requests (v2.32.3)
  • scikit-learn (v1.6.1)
  • scipy (v1.15.2)
  • seaborn (v0.13.2)
  • SQLAlchemy (v2.0.38)
  • transformers (v4.49.0)
  • anthropic (v0.49.0)
  • daytona_sdk (v0.11.1)
  • huggingface (v0.0.1)
  • instructor (v1.7.3)
  • langchain (v0.3.20)
  • llama-index (v0.12.22)
  • ollama (v0.4.7)