Skip to content

Jaid/docker-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

177 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-builder

Latest GitHub release GitHub Actions workflow status DockerHub stars DockerHub pulls Docker image size

opinionated Docker builder image for downstream projects that want a modern Linux build environment without maintaining their own bootstrap layer

Included tooling

  • C and C++ toolchains, CMake, Ninja, Flex, Automake, gettext and pkg-config
  • Python via uv
  • OpenJDK and Maven
  • Bun
  • Rust and Cargo
  • sd plus the helper scripts from src/userBin

Downstream usage

The image is meant to be used as an ONBUILD base. During a downstream build it looks for these scripts inside the child build context and executes them in order:

  • build/build.bash
  • build/build1.bash
  • build/build2.bash

Each script runs with /build as the working directory. The downstream build context is mounted read-only at /context, so build scripts can copy or compile files from there without baking the raw source tree into the base image layers.

FROM jaidchen/builder:latest
#!/bin/bash
set -o errexit -o pipefail

cp --recursive /context/. /build/project
cd /build/project
bun install --frozen-lockfile
bun run build

Local helper scripts

  • bin/build builds and loads the local builder-dev image.
  • bin/buildFs exports the built image filesystem. On Windows it writes dist/fs.tar, because NTFS cannot represent all Linux filesystem entries.
  • bin/run builds and runs the local dev container.
  • The helper scripts can fall back to Docker Desktop’s standalone docker-buildx.exe and docker-compose.exe binaries if the docker subcommands are not wired up in the current shell.

Notes

  • BuildKit is required.
  • The default image variants are published from the GitHub workflow matrix in .github/workflows/pushDocker.yml.
  • Local helper scripts live in ./bin.
  • The default Bun version is pinned to 1.3.13.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors