Build minimal Linux container images with Homebrew packages.
Choose the packages you need. dalec-homebrew builds a ready-to-run image for you.
dalec-homebrew uses Dalec to turn Homebrew packages into minimal, non-root Linux container images.
- Choose packages from
homebrew/core. - Get a minimal, non-root image without Homebrew or package managers.
- Keep an SBOM and a record of everything included in the image.
You need Docker Buildx and a digest-pinned dalec-homebrew frontend. Use a digest supplied by a trusted release pipeline, or see Contributing to build the component tuple yourself.
Build directly from the command line with jq:
jq -nc '{
dependencies: {runtime: {hello: {}}},
image: {entrypoint: "/home/linuxbrew/.linuxbrew/bin/hello"}
}' |
docker buildx build \
--build-arg "BUILDKIT_SYNTAX=ghcr.io/sozercan/dalec-homebrew@sha256:<frontend-digest>" \
--platform linux/amd64 \
--tag hello-runtime:inline \
--load \
-
docker run --rm hello-runtime:inlineSave this as hello.yaml, replacing <frontend-digest> with the same immutable frontend digest:
# syntax=ghcr.io/sozercan/dalec-homebrew@sha256:<frontend-digest>
dependencies:
runtime:
hello: {}
image:
entrypoint: /home/linuxbrew/.linuxbrew/bin/helloBuild and run it:
docker buildx build \
--platform linux/amd64 \
--file hello.yaml \
--tag hello-runtime:spec \
--load \
.
docker run --rm hello-runtime:specBoth forms print:
Hello, world!
See the usage reference for image settings, tests, dependency rules, and the complete supported contract.
| Supported | Not supported |
|---|---|
Linux amd64 and arm64 |
Other platforms |
Current homebrew/core bottles |
Casks, third-party taps, and source builds |
| Non-root images | Custom base images and networked tests |
More examples: multi-package toolchain, Python, Redis, Graphviz, and glibc.
Usage 路 Security 路 Architecture 路 Releases 路 Contributing