Zero-configuration Docker builds with Cirrus CI

Fedor Korotkov
CirrusLabs
Published in
2 min readAug 3, 2018

Cirrus CI has a very expressive and concise format of configuration files. .cirrus.yml configuration file for a simple web application can be as small as the following 5 lines:

container:
image: node:latest
build_task:
install_script: yarn install
build_script: yarn run build

But sometimes even writing and pushing 5 lines of code is too much!

Nowadays many projects provide a Dockerfile that builds the project for a very simple reason: to not deal with environment inconsistencies in CI and everyone’s laptop.

Starting today Cirrus CI will automatically attempt to build your project if there is a Dockerfile in the root of the repository. No need to create .cirrus.yml file anymore!

Zero-configuration Docker Build on Cirrus CI

Under the hood Cirrus CI simply creates a container-based task that uses Google’s Kaniko project for building the Docker image.

Kaniko is a tool to build container images from a Dockerfile, inside a container. Kaniko doesn’t depend on a Docker daemon and executes each command within a Dockerfile completely in userspace.

Kaniko itself is shipped as a tiny Docker container. It allows to start a Kaniko build almost instantly on Cirrus CI’s Community Cluster which is available free of charge to public GitHub projects.

We highly encourage you to try out Cirrus CI. It’s free for Open Source projects and very easy to setup! Also there is a 14 days free trial for private repositories.

Follow us on Twitter and if you have any questions don’t hesitate to ask.

--

--