update readme

master
David Kebler 2023-03-27 11:34:56 -07:00
parent bc0d3a72a5
commit da61c57306
1 changed files with 9 additions and 35 deletions

View File

@ -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 `<source directory>/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 <subcommand> <options> <build_target> <imagename, imageuser>
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 <arch, exists, id> 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 <ARGUMENT>:
-e <path to environment file> load any or all of options below via a file
-d <LINUX_DISTRO> supported: alpine, debian, ubuntu, default: alpine; if base image set distro will be determined
-t <TAG> tag following : in output image name (i.e. REPO/USER/NAME:TAG), default: latest
-u <USER>; repository user prefix in output image name (i.e. REPO/USER/NAME:TAG)
-r <REPO>; private repo name, do not use for hub.docker.com (docker.io)
-b <BASE_IMAGE>; used in FROM in Dockerfile, default is official distro image (e.g. alpine:latest)
-w <BUILD_DIR>; set a custom WORKDIR in Dockerfile (in image), default is /build, see -k
--- options set ONLY by environment variable (see -e as well)
<SYSADMIN_PW> set alternate password for container sysadmin account, default is 'sysadmin'
NOTE any option with <CAPTIALIZED> 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)