8000 GitHub - Zeglius/mybazzite · GitHub
[go: up one dir, main page]

Skip to content
ZegliusPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

image-template

Purpose

This repository is meant to be a template for building your own custom Universal Blue image using Earthly. This template is the recommended way to make customizations to any image published by the Universal Blue Project:

This template leverages Earthly for reproducible and efficient builds of your container image, orchestrated by GitHub Workflows. The built image is then pushed to the GitHub Container Registry.

Prerequisites

Working knowledge in the following topics:

How to Use

Template

Select Use this Template and create a new repository from it. To enable the workflows, you may need to go the Actions tab of the new repository and click to enable workflows.

Containerfile

This file defines the operations used to customize the selected image. It contains examples of possible modifications, including how to:

  • change the upstream from which the custom image is derived
  • add additional RPM packages
  • add binaries as a layer from other images

Earthfile

The Earthfile orchestrates the build process. It utilizes the Containerfile as the base definition for your image layers and integrates additional packages. It also handles the tagging and pushing of the final image to the container registry.

Specifically, the Earthfile's build target:

  • Builds the Containerfile.
  • Integrates artifacts from Earthly builds defined in packages/*.
  • Calls the SAVE_IMAGE target to tag and push the image.

Building an ISO

Modify iso.toml to point to your custom image before generating an ISO.

  • (Steps in progress)

GitHub Workflows

build.yml

This workflow uses Earthly to create your custom OCI image and publishes it to the GitHub Container Registry (GHCR). It invokes the build target within the Earthfile, passing necessary arguments such as BASE_IMAGE, branch, and commit_hash.

Container Signing

Container signing is important for end-user security and is enabled on all Universal Blue images. It is recommended you set this up, and by default the image builds will fail if you don't.

This provides users a method of verifying the image.

  1. Add the private key to GitHub:

    • This can be done manually. Go to your repository settings, under Secrets and Variables -> Actions.
    • Add a new secret and name it SIGNING_SECRET.
    • Paste the contents of your cosign.key in 6094 to the secret and save it. Make sure it's the .key file and not the .pub file.
    • If you have the github-cli installed, you can run:
      gh secret set SIGNING_SECRET < cosign.key
    • The cosign.key is generated by running cosign generate-key-pair. You should NOT provide a password when prompted for it, as the key will be used in GitHub Actions.
    • WARNING: Be careful to never accidentally commit cosign.key into your git repo.
  2. Commit the cosign.pub file to the root of your git repository.

Community

  • bootc discussion forums - Nothing in this template is ublue specific, the upstream bootc project has a discussions forum where custom image builders can hang out and ask questions.
  • Index your image on artifacthub.io, use the artifacthub-repo.yml file at the root to verify yourself as the publisher.

Community Examples

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

0