Back to blog

Running Docker in your CI/CD pipeline

Published April 02, 2026

At Zippy we believe that Docker is an industry standard that needs to be supported out of the box. In this blog post we will set up a Docker CI/CD pipeline from scratch. The first run installs in a minute and after that it’s 4 seconds.

Writing Your First Dockerfile

Docker containers are created with a Dockerfile. A Dockerfile defines what the container looks like. In this example we will use go-lang that runs a small unit test.

FROM golang:1.23-alpine

WORKDIR /app

RUN go mod init demo

RUN printf 'package main\n\nimport "testing"\n\nfunc TestAdd(t *testing.T) {\n\tif 1+1 != 2 {\n\t\tt.Fatal("math is broken")\n\t}\n}\n' > math_test.go

CMD ["go", "test", "-v", "./..."]

Running it locally

Let’s try to run docker for the first time locally:

Great, our unit test works! Now let’s bring it to our Zippy pipeline.

Setting up the Zippy CI/CD Pipeline

Environment setup

Install docker on the ubuntu environment:

#!/bin/bash
set -e

apt-get update
apt-get install -y ca-certificates curl
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
chmod a+r /etc/apt/keyrings/docker.asc

tee /etc/apt/sources.list.d/docker.sources <<EOF
Types: deb
URIs: https://download.docker.com/linux/ubuntu
Suites: noble
Components: stable
Architectures: $(dpkg --print-architecture)
Signed-By: /etc/apt/keyrings/docker.asc
EOF

apt-get update

apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Zippy pipeline script

The pipeline script itself is quite minimal:

#!/bin/bash

set -e

docker build .

Subsequent runs, just 4 seconds!

The total docker set up only took around a minute. But knowing the environment only spins up once, the next time only takes 4 seconds.

Try it. One minute to set up.

If you've ever waited for a CI runner to spin up, you'll get why this exists.

14-day Pro trial. No credit card.