# Build Container

Build Container is a reusable GitHub Actions workflow for building container images and bundles from source using Docker BuildKit. It is open source and self-hosted, installable on Docker Hub.

Canonical page: https://ourlocalhost.com/app/5430/build-container

## Description

Build Container is a reusable GitHub Actions workflow for building container images and bundles from source using Docker BuildKit. It adds multi-platform builds, registry and GitHub Actions caching, provenance, a software bill of materials (SBOM), and image signing, plus secure registry logins via OpenID Connect, so developers using GitHub can build and push containers consistently without maintaining their own build scripts.

## Platform availability

Available on 0 of 10 platforms.

## Health score

68/100 (Good), based on 5 of 5 factors.
- Maintained: 100 (last commit 16 days ago)
- Popular: 39 (91 GitHub stars)
- Easy to install: 40 (0 install platforms, install notes, setup guide, Docker image)
- Light to run: 30 (4 GB minimum RAM)
- Security check: 95 (no serious findings, CI, tests)

## Links

- Docker Hub: https://hub.docker.com/r/heroku/builder
- Official website: https://docs.docker.com/build/ci/github-actions/github-builder/
- GitHub: https://github.com/docker/github-builder

## Common questions

### What does Docker do to a build container after a Dockerfile RUN command finishes?

A build container is created for Dockerfile instructions such as RUN, where the command is run and the container is committed to an image layer.

### What must be replaced in a build config before building the container image?

Set your real project and image names by replacing the sample project, repository, and image values. Without these, the build will not know where to put the finished container.

### Where must the source code be placed when using a custom builder?

Put the code in the /workspace folder because the builder uses that folder as its working directory. If files or the Dockerfile are not where the build expects them, the container build can fail.

### How can a self-hosted build agent container be extended with additional tools?

You can create a basic build agent and extend the Dockerfile to include additional tools and their dependencies. You can also build your own container by using that agent image as a base layer.

---
Source: Our Local Host (https://ourlocalhost.com/app/5430/build-container), the self-hosted and open-source app directory.
