A set of docker image build scripts using buildx bake
 
 
 
Go to file
David Kebler ca4713d56b refactored custom core processing, now uses a core directory in the /src
entrpoint now uses exec to call the entrypoint command thus not spawing a subshell
updated uci shell code and added /root/shell so to avoid constant warning about it missing.
add /opt/bin to path in dockerfile
2024-10-17 16:17:59 -07:00
Dockerfile.d refactored custom core processing, now uses a core directory in the /src 2024-10-17 16:17:59 -07:00
core refactored custom core processing, now uses a core directory in the /src 2024-10-17 16:17:59 -07:00
example reorganize source (src) using /rootfs to copy any files into image 2024-01-14 14:57:09 -08:00
lib refactored custom core processing, now uses a core directory in the /src 2024-10-17 16:17:59 -07:00
test refactored custom core processing, now uses a core directory in the /src 2024-10-17 16:17:59 -07:00
.dockerignore refactor: new BUIlD_SRC supported from multiple locations including environment 2023-03-25 11:27:22 -07:00
.gitignore refactored custom core processing, now uses a core directory in the /src 2024-10-17 16:17:59 -07:00
build refactored custom core processing, now uses a core directory in the /src 2024-10-17 16:17:59 -07:00
distros.csv reorganize source (src) using /rootfs to copy any files into image 2024-01-14 14:57:09 -08:00
docker-bake.hcl improved determining distro and distro image 2024-09-15 18:47:22 -07:00
install refactor: generate Dockerfile from a template 2023-04-14 21:27:40 -07:00
readme.md improved determining distro and distro image 2024-09-15 18:47:22 -07:00

readme.md

UCI Docker Image Builder

Easily build docker images for local use and publishing without messing around with a Dockerfile. Just some knowledge of BASH scripting is needed.

The "guts" of this repo is a single BASH shell script plus associated library to facilitate building docker linux images using any of four of these distros (arch,alpine,debian,ubuntu) and either architecture (amd64/arm64)

About

Prequisites

You need docker daemon installed with some other installation particulars in order to build images

The Dockerfile is assembled at build time is essentially two RUN commands. One to install packages (you specify) via a distro's package manager and then one to run a BASH init script that you write with specifics of initializing the image with whatever software the image is tasked to do. You specify those by setting a BUILD_SRC build source directory. This repo comes with a very basic build source which can handle any of the four distros mentioned. To build something more complicated you need to create your or src/ directory (see docs) or use one already developed (e.g. uci-docker-caddy repo)

Baked into the initilization RUN is an entrypoint script that makes interacting with the image/container easy and also to launch your "custom" app within th container.

The build makes user of docker's "buildx bake" commands and a docker-bake.hcl file to make local images

The default build is simply a basic alpine image saved locally to alpine:lastest.

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 images in one of two ways.

  1. edit the /src directory on this master branch (or a better a branch)
  2. Use the installer script (./install) to link the build script into your system path. THen you can develop a BUILD_SRC src/ directory anywhere and call the build script from there

It is recommended to do the later.

Supported distros are found in distros.csv in the root of the repository. Do NOT delete this file. It is possible to add other distros. This file links itself into lib/ and core/opt/lib

TODO need more details (docs folder?)

to update the uci shell/base cd to /core/shell/base, then git pull origin master