From da61c573063ad19d0ede06b260e91860b7459e3f Mon Sep 17 00:00:00 2001 From: David Kebler Date: Mon, 27 Mar 2023 11:34:56 -0700 Subject: [PATCH] update readme --- readme.md | 44 +++++++++----------------------------------- 1 file changed, 9 insertions(+), 35 deletions(-) diff --git a/readme.md b/readme.md index 3eb4d22..b937d70 100644 --- a/readme.md +++ b/readme.md @@ -25,9 +25,9 @@ The master branch is configured to build base images from the docker hub distro 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 install which just creates a link in /opt/bin +To run the ./build script from other repos install it using the install script -`ln -nsf $(dirname "$(realpath "$BASH_SOURCE")")/build /opt/bin/dbuild` +'./install The repo also supports (with scripts) pushing to alternate private repositories packages (like a self hosted gitea or github) @@ -42,37 +42,11 @@ the build script requires an init.sh file in a source directory for the scripts by default that is `/init.sh`. by default that source directory is `src/` relative to the current directory -``` -Image Build Script: Creates one or more images using a target in the docker-bake.hcl file -USAGE: /opt/bin/dbuild -valid build_target: dev arm amd deploy private multi; default: dev -### subcommands: -try (runs try a container script, see try usage) /opt/bin/dbuild try -i -tag (runs image_tag script) -info get image info, info nothing is all info in json ---- option switches (no argument): --o do not overwrite an existing image (default), instead move it to a temporary timestamp tag --i rebuild only the initialization RUN by busting the cache at that point --v show verbose information about the build --a (auto) do not prompt to continue build, by default will not prompt if non-interactive shell --c after build try out the image by starting a container terminal therein, for dev target this is the default; --x exclude distro from image name; --n for --no_cache --k keep the build scripts (see -w) after the build so they are incorporated into the image --p push to repository; after build push to repository default is hub.docker.com (not need for deploy target) ---- options with argument : --e load any or all of options below via a file --d supported: alpine, debian, ubuntu, default: alpine; if base image set distro will be determined --t tag following : in output image name (i.e. REPO/USER/NAME:TAG), default: latest --u ; repository user prefix in output image name (i.e. REPO/USER/NAME:TAG) --r ; private repo name, do not use for hub.docker.com (docker.io) --b ; used in FROM in Dockerfile, default is official distro image (e.g. alpine:latest) --w ; set a custom WORKDIR in Dockerfile (in image), default is /build, see -k ---- options set ONLY by environment variable (see -e as well) - set alternate password for container sysadmin account, default is 'sysadmin' -NOTE any option with above can be set in environment instead -#### examples: -/opt/bin/dbuild -a -d ubuntu -u ucommandit -build (without prompt) a local ubuntu image from scratch and label it ucommandit/ubuntu:latest -``` +run + +`./build -h` + +for help + +also see examples folder for example build environment file (more help details)