18 lines
1.2 KiB
Bash
18 lines
1.2 KiB
Bash
#!/bin/bash
|
|
usage() { # Function: Print a help message.
|
|
echo "Image Build Script: Creates one or more images using a target in the docker-bake.hcl file"
|
|
echo "USAGE: $0 <setup options> buildtarget <imagename, imageuser>"
|
|
echo "valid targets: ${targets[*]}; default: dev"
|
|
echo no argument options:
|
|
echo "-c try out the image by starting a container terminal therein, for dev target this is the default;"
|
|
echo "-x exclude distro from image name;"
|
|
echo "-n for --no_cache"
|
|
echo "-p push to repository; after build push to repository default is hub.docker.common (not need for deploy target)"
|
|
echo required argument options:
|
|
echo "-d <LINUX_DISTRO> supported: alpine, debian, ubuntu, default: alpine; if base image set distro will be determined"
|
|
echo "-t <TAG> tag following : in output image name (i.e. REPO/USER/NAME:TAG), default: latest"
|
|
echo "-u <USER>; repository user prefix in output image name (i.e. REPO/USER/NAME:TAG)"
|
|
echo "-r <REPO>; private repo name, do not use for hub.docker.com (docker.io)"
|
|
echo "-b <BASE_IMAGE>; used in FROM in Dockerfile, default is official distro image (e.g. alpine:latest)"
|
|
echo "-w <SCRIPTS>; set a custom WORKDIR in Dockerfile, default is /opt/build"
|
|
} |