> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runloop.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Running Docker on a Devbox

> Run Docker on a Devbox (Docker-in-Docker)

<Tip>Start with the [Runloop Quickstart](/docs/tutorials/quickstart) to use the examples below.</Tip>

Projects often have dependencies on external services. For example, a project may need to run a database or a message queue.

A common pattern is for developers to run these services on their
local workstations. This is not ideal since allowing AI agents to
access services outside their own container can create security risks.
Runloop solves this problem by allowing you to run AI ageints along
side Docker-based services all on the same Devbox.

We have specific extensible blueprints for running Docker-in-Docker on a Devbox. You can use one of our standard blueprint images to start a devbox or build your own custom, base blueprint for accomplishing this task.

## Standard Blueprints

These Blueprints support Docker-in-Docker. When using these blueprints, your Devbox profile is `root`.

| Blueprint Name                              | Architecture | OS           | Library support | Dockerfile FROM                                          |
| ------------------------------------------- | ------------ | ------------ | --------------- | -------------------------------------------------------- |
| `runloop/ubuntu-dnd-x86_64`                 | x86\_64      | Ubuntu 24.04 | Slim            | `FROM runloop:runloop/ubuntu-dnd-x86_64`                 |
| `runloop/ubuntu-dnd-arm64`                  | ARM64        | Ubuntu 24.04 | Slim            | `FROM runloop:runloop/ubuntu-dnd-arm64`                  |
| `runloop/universal-ubuntu-24.04-x86_64-dnd` | x86\_64      | Ubuntu 24.04 | Complete        | `FROM runloop:runloop/universal-ubuntu-24.04-x86_64-dnd` |
| `runloop/universal-ubuntu-24.04-arm64-dnd`  | ARM64        | Ubuntu 24.04 | Complete        | `FROM runloop:runloop/universal-ubuntu-24.04-arm64-dnd`  |

## Running Docker-in-Docker from a Devbox

<CodeGroup>
  ```python Python theme={null}
  # This uses universal-ubuntu-24.04-x86_64-dnd
  devbox = await runloop.devbox.create(
      name="docker-in-docker-devbox",
      blueprint_name="runloop/universal-ubuntu-24.04-x86_64-dnd"
  )
  await devbox.cmd.exec_async("docker run hello-world")
  ```

  ```typescript TypeScript theme={null}
  // This uses universal-ubuntu-24.04-x86_64-dnd
  const devbox = await runloop.devbox.create(
      name="docker-in-docker-devbox",
      blueprint_name="runloop/universal-ubuntu-24.04-x86_64-dnd"
  )
  await devbox.cmd.execAsync("docker run hello-world")
  ```
</CodeGroup>

## Configuring a Blueprint that supports Docker-in-Docker

<CodeGroup title="Blueprint">
  ```python Python theme={null}
  # uses ubuntu-dnd.arm64
  blueprint = await runloop.blueprint.create(
      name="docker-in-docker-blueprint",
      dockerfile="FROM runloop:runloop/ubuntu-dnd-arm64"
  )

  devbox = await blueprint.create_devbox(
      name="docker-in-docker-devbox"
  )
  await devbox.cmd.exec_async("docker run hello-world")
  ```

  ```typescript TypeScript theme={null}
  // uses ubuntu-dnd-arm64
  const blueprint = await runloop.blueprint.create(
    name: "docker-in-docker-blueprint",
    dockerfile: "FROM runloop:runloop/ubuntu-dnd-arm64"
  )

  const devbox = await blueprint.create_devbox(
      name: "docker-in-docker-devbox"
  )
  await devbox.cmd.exec_async("docker run hello-world")
  ```
</CodeGroup>
