Skip to content

Repository files navigation

dalec-homebrew

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.

What you get

  • 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.

Build an 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 from the command line

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:inline

Build from YAML

Save 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/hello

Build and run it:

docker buildx build \
  --platform linux/amd64 \
  --file hello.yaml \
  --tag hello-runtime:spec \
  --load \
  .

docker run --rm hello-runtime:spec

Both forms print:

Hello, world!

See the usage reference for image settings, tests, dependency rules, and the complete supported contract.

Scope

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

Examples

More examples: multi-package toolchain, Python, Redis, Graphviz, and glibc.

Learn more

UsageSecurityArchitectureReleasesContributing

About

馃嵑 Dalec BuildKit frontend that turns verified Homebrew bottles into minimal, non-root Linux images

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages