Projects often have dependencies on external services. For example, a project may need to run a database or a message queue. In the past, you would have to run these services on your local machine. This is not ideal for a few reasons, especially given that Agents cannot easily interact with services off the container and the security considerations for a remote solution. On Runloop, you can run these services on a Devbox. We have specific extensible prebuilts for running Docker in Docker on a Devbox. You can use one of our pre-built images to start a devbox or build your own base blueprint for accomplishing this task.

Prebuilts

There are two Ubuntu prebuilts available for running Docker in Docker:
  • universal_base.ubuntu.22.04-dnd
  • universal_base.ubuntu.24.04-dnd
The only difference between the two prebuilts is the version of Ubuntu used. When using these prebuilts, your devbox profile is root.

Running Docker in Docker from a Devbox

curl --request POST \
  --url https://api.runloop.ai/v1/devboxes \
  --header "Authorization: Bearer $RUNLOOP_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "docker-in-docker-devbox",
  "prebuilt": "universal_base.ubuntu.22.04-dnd"
}'

Configuring a Blueprint that supports Docker in Docker

The following images are available for building a Blueprint that supports Docker in Docker:
  • public.ecr.aws/f7m5a7m8/devbox:prod-ubuntu-dnd
  • public.ecr.aws/f7m5a7m8/devbox:prod-dnd
  • public.ecr.aws/f7m5a7m8/prebuilts/universal_base.ubuntu.22.04-dnd
  • public.ecr.aws/f7m5a7m8/prebuilts/universal_base.ubuntu.24.04-dnd
The prod-ubuntu-dnd and prod-dnd images are the slimmest images while the universal_base.ubuntu.22.04-dnd and universal_base.ubuntu.24.04-dnd images are the most complete images with extra libraries built-in. prod-dnd is running Debian while the remaining images are running Ubuntu.
curl --request POST \
  --url https://api.runloop.ai/v1/blueprints \
  --header "Authorization: Bearer $RUNLOOP_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "docker-in-docker-blueprint",
  "dockerfile": "FROM public.ecr.aws/f7m5a7m8/devbox:prod-ubuntu-dnd"
}'