Docker in Docker

Buddy offers a complete collection of tools and services required to build, test and deploy Docker images. Users who demand more flexibility in their process can use the Docker CLI action. The action runs commands on an Ubuntu VM with preinstalled Docker CLI in the context of the Git repository to which the pipeline is attached.

This is especially useful for operations that require:

  • docker-compose
  • privileged access to Docker containers (Docker-in-Docker)
  • access to the Docker daemon

Image loading...Docker CLI in action roster

Warning
Docker images built with Docker CLI are not available for Docker Push and Docker Run actions in the pipeline. In other words, if you want to build an image on the VM and then push it to the registry, you must do both operations from the CLI.

Docker Build Cache

Image loading...Docker CLI commands with cache configuration

When you add a new Docker CLI in VM action, Buddy suggests three lines of commands that set up Docker buildx with cache.
The first line creates a Docker context, the second creates a buildx builder, and the third executes the build using that builder with cache parameters.

Hint

If you're building in your own pipeline, make sure to adapt your build command to use these cache parameters (--cache-to and --cache-from) for optimal performance.

Configuration

When configuring the Docker CLI in VM action, you can specify:

VM Configuration

Image loading...VM configuration options

  • VM: Choose how the Virtual Machine is provisioned:
    • New Docker VM: Create a new Docker-enabled VM
    • Amazon Machine Image: Use an existing AMI (requires AMI ID, username)
    • From action: Reuse VM from a previous action

When using "From action", you can specify:

  • Previous action: Automatically use the VM from the most recent action
  • Fixed: Choose a specific action by name

File Transfer

Upload files from pipeline filesystem to VM before action run

Transfer files from the pipeline filesystem to the VM before executing Docker commands. By default, files are transferred from / (pipeline root) to /home/ubuntu/build on the VM.

Download files from VM to pipeline filesystem after action run

Transfer files from the VM back to the pipeline filesystem after Docker commands complete. By default, files are transferred from /home/ubuntu/build on the VM to / (pipeline root).

Caching

  1. When the action is run, Buddy copies the files from the pipeline filesystem with the clone of the repository to the VM with Docker.
  2. Once finished, the output is transferred back to the filesystem (by default /home/ubuntu/build) and the VM is killed.
Hint
The default size of the drive is 10 GB. If you need more space, please contact our support team.

YAML i API

Last modified on Oct 30, 2025

Recommended