uci-docker-build/readme.md

1.9 KiB

UCI Docker Image Builder

Prerequistes:

see https://hacking.kebler.net/Linux/Arch/docker/

A build script plus associated library to facilitate building docker linux images using any of four distros (arch,alpine,debian,ubuntu) and either architecture (amd64/arm64)

The Dockerfile is minimal copying a directory and then calling a packages script and and init script in two RUN statements calling a set of distro specific scripts and common scripts in order to build the image

The build environment makes user of docker's "buildx bake" commands and a docker-bake.hcl file

The master branch is configured to build base images from the docker hub distro base images

The main script is "build" At the very minimum run as just ./build it will build an alpine image from the docker hub official alpine latest image with a minimal set of packages installed (e.g. git) and a custom uci shell environment.

To run the ./build script from other repos install it using the install script

'./install

The repo also supports (with scripts) pushing to alternate private repositories packages (like a self hosted gitea or github)

One can make decendent images in one of two ways.

  1. Make your base images on the master branch (or a branch if you need to customize)
  2. User the installer script (./install) to link the build script into your system path. Then clone the template branch

the build script requires an init.sh file in a source directory for the scripts it will run while building a new image by default that is <source directory>/init.sh. by default that source directory is src/ relative to the current directory

run

./build -h

for help

also see examples folder for example build environment file (more help details)