Introducing: New Docker CLI

February 1, 2023

Introducing: New Docker CLI

Since it launched in 2013, Docker has been a blessing for software developers. A single isolated test environment, a single runtime with tools and dependencies shared across the whole team, speed and ease of use, scalability ensured by Kubernetes – all perfectly aligning with what CI/CD should be about.

10 years ahead, Buddy lets you automate basically every single Docker task:

  • build a Docker image, either single or multi-arch
  • run the image in the pipeline and test it for errors
  • push the image to the selected registry: Docker Hub, Amazon ECR, Google GCR & Artifact Registry, or any private registry
  • pull and run the image on a remote server
  • orchestrate containers and run Helm operations on Kubernetes clusters
  • lint the Dockerfile for errors

Docker actions in BuddyDocker actions in Buddy

However, due to the way containers communicate with each, users who wanted to run Docker in Docker or docker-compose operations were forced to use the Ubuntu VM action with preinstalled Docker CLI. The action launches a dedicated VM isolated from the rest of the infrastructure, uploads the files from the pipeline filesystem, runs the commands on the files, and downloads the processed files back to the filesystem. However, the drawback to this solution is somewhat sluggish performance when compared to "regular" container actions.

Which has changed now.

The new Docker CLI action

The new Docker CLI action released last week has been rewritten from scratch to work with the pipeline filesystem. The benefits are plentiful:

  • user no longer needs to wait until the VM is ready
  • no need to define sync paths between the VM and the filesystem
  • Docker images do not have to be uploaded to the registry and downloaded to use them on the VM
  • the Docker cache is shared with other Docker actions
  • docker-compose and Docker in Docker are fully supported
The result is much better performance, less configuration, and improved reliability.

How it works

The action launches a container with Docker CLI. Inside the container, you can define the commands to run:

Docker CLI command tabDocker CLI command tab

Additionally, you can select the Docker registry to which and from which you can push or pull images required by your workflow:

Docker CLI registry tabDocker CLI registry tab

As with other actions, you can customize the container with required tools and packages, define trigger conditions, and use environment variables to streamline your process. Go ahead, give it a try, and let us know how it performs against your current setup.

Cheers!

As Buddy is entirely customer-driven, we are looking forward to hearing what else you require from your perfect CI/CD tool. Drop a line, let us know, and let's make it happen!

Share:

Alexander Kus

Alexander Kus

Customer Success Manager

A story-teller and conversation-lover, Alexander decided to invest his skills to help his friends at Buddy transform the cold language of patch notes into exciting narratives. Also: an avid gamer, hip-hop DJ, Liverpool FC fan, absentminded husband, and the father of two.