Mastodon Skip to content

How to build and test locally

This guide shows you how to use Bluebuild CLI to do the following things locally, without depending on the BlueBuild GitHub Action:

  • preview the Containerfile generated your recipe.yml locally;
  • test your recipe.yml build process locally before pushing to GitHub;
  • install a locally built image onto a virtual machine;
  • rebase your currently running operating system onto a locally built image;

Installing BlueBuild CLI

The BlueBuild CLI tool is installed by default on images built using BlueBuild. There are also several methods available for installing the BlueBuild CLI tool, documented in the the BlueBuild CLI README.

Using BlueBuild CLI

The repository README has general instructions for using the bluebuild CLI tool. Example use cases for some of the commands follow in the sections below.

Template

Build

The build command builds an image from a recipe; you can use this command to test your recipe locally before pushing the recipe to GitHub:

Terminal window
bluebuild build ./recipes/recipe.yml

You can see that the BlueBuild GitHub Action uses the same build command, with additional --push and --registry options for pushing successful build to ghcr.io or similar image repositories.

You can see the complete list of available options using bluebuild build help.

Upgrade

Rebase