From 8f7365eded030e102bae997cd65fdb5dfdbd56e0 Mon Sep 17 00:00:00 2001 From: ook37 Date: Wed, 10 Jan 2024 20:39:57 -0500 Subject: [PATCH] fit to regular terminal --- README.md | 59 ++++++++++++++++++++++---------------------- rhino-docker-builder | 59 ++++++++++++++++++++++---------------------- 2 files changed, 60 insertions(+), 58 deletions(-) diff --git a/README.md b/README.md index bfa6ff5..cf55b0c 100644 --- a/README.md +++ b/README.md @@ -1,58 +1,59 @@ # Rhino Docker Builder -A script that helps to easily build and test Rhino Linux Docker images. +This script helps to easily build and test Rhino Linux Docker images, or pull +them upstream. Designed to be adaptable with other Ubuntu-based Docker builds. ``` Usage: rhino-docker-builder [OPTIONS] Options: - -V/-v, --version Image version tag - (default: current date in YYYYMMDD format) +-V/-v, --version Image version tag + (default: current date in YYYYMMDD format) - -A/-a, --arch Target architecture - (options: auto, arm64/aarch64, amd64/x86_64, default: all/off) +-A/-a, --arch Target architecture + (options: auto, arm64/aarch64, amd64/x86_64, default: all/off) - -C/-c, --clean Use --no-cache during Docker image build - (default: disabled) +-C/-c, --clean Use --no-cache during Docker image build + (default: disabled) - -F/-f, --file Create only the Dockerfile, with instructions - (default: prompted) +-F/-f, --file Create only the Dockerfile, with instructions + (default: prompted) - -B/-b, --build Create both the Dockerfile and the Docker image - (default: prompted) +-B/-b, --build Create both the Dockerfile and the Docker image + (default: prompted) - -P/-p, --pull Pull a Docker image from the upstream registry - (options: --version, default: always uses --arch auto) +-P/-p, --pull Pull a Docker image from the upstream registry + (options: --version, default: always uses --arch auto) - -T/-t, --test Start the Docker image up after build or pull is complete - (default: disabled or prompted) +-T/-t, --test Start the Docker image up after build or pull is complete + (default: disabled or prompted) - -W/-w, --wipe Hazardous: Delete all related Dockerfiles and Docker images - (default: always prompted) +-W/-w, --wipe Hazardous: Delete all related Dockerfiles and Docker images + (default: always prompted) - -H/-h, --help Show this help message +-H/-h, --help Show this help message Examples: - rhino-docker-builder -f + rhino-docker-builder -f - Creates the file Dockerfile-RhinoLinux-YYYYMMDD for building the image - rhino-linux/docker:YYYYMMDD, with instructions on how to build and run it. + Creates the file Dockerfile-RhinoLinux-YYYYMMDD for building the image + rhino-linux/docker:YYYYMMDD, with instructions on how to build and run it. - Note: if no options are passed, this is the default function, but users - will be asked if they would like to build and test the image. + Note: if no options are passed, this is the default function, but users + will be asked if they would like to build and test the image. - rhino-docker-builder -b -t -c -v 2023.4 -a x86_64 + rhino-docker-builder -b -t -c -v 2023.4 -a x86_64 - Builds and starts amd64/rhino-linux/docker:2023.4 from scratch. + Builds and starts amd64/rhino-linux/docker:2023.4 from scratch. - Note: the version tag may not correlate with the actual Rhino Linux version. - This option is meant for easily publishing images for specific milestones. + Note: the version tag may not correlate with the actual Rhino Linux version. + This option is meant for easily publishing images for specific milestones. - rhino-docker-builder -p -t -v latest + rhino-docker-builder -p -t -v latest - Pulls and starts ghcr.io/rhino-linux/docker:latest. + Pulls and starts ghcr.io/rhino-linux/docker:latest. ``` \ No newline at end of file diff --git a/rhino-docker-builder b/rhino-docker-builder index a0bd675..0b0f7ab 100755 --- a/rhino-docker-builder +++ b/rhino-docker-builder @@ -32,58 +32,59 @@ ${BYellow}Usage:${NC} ${0##*/} ${PURPLE}[OPTIONS]${NC} ${BYellow}Options:${NC} - ${BGreen}-V/-v, --version${NC} Image version tag - (default: ${CYAN}current date in YYYYMMDD format${NC}) +${BGreen}-V/-v, --version${NC} Image version tag + (default: ${CYAN}current date in YYYYMMDD format${NC}) - ${BGreen}-A/-a, --arch${NC} Target architecture - (options: ${CYAN}auto${NC}, ${CYAN}arm64${NC}/${CYAN}aarch64${NC}, ${CYAN}amd64${NC}/${CYAN}x86_64${NC}, default: ${CYAN}all${NC}/${CYAN}off${NC}) +${BGreen}-A/-a, --arch${NC} Target architecture + (options: ${CYAN}auto${NC}, ${CYAN}arm64${NC}/${CYAN}aarch64${NC}, ${CYAN}amd64${NC}/${CYAN}x86_64${NC}, default: ${CYAN}all${NC}/${CYAN}off${NC}) - ${BGreen}-C/-c, --clean${NC} Use --no-cache during Docker image build - (default: ${CYAN}disabled${NC}) +${BGreen}-C/-c, --clean${NC} Use --no-cache during Docker image build + (default: ${CYAN}disabled${NC}) - ${BGreen}-F/-f, --file${NC} Create only the Dockerfile, with instructions - (default: ${CYAN}prompted${NC}) +${BGreen}-F/-f, --file${NC} Create only the Dockerfile, with instructions + (default: ${CYAN}prompted${NC}) - ${BGreen}-B/-b, --build${NC} Create both the Dockerfile and the Docker image - (default: ${CYAN}prompted${NC}) +${BGreen}-B/-b, --build${NC} Create both the Dockerfile and the Docker image + (default: ${CYAN}prompted${NC}) - ${BGreen}-P/-p, --pull${NC} Pull a Docker image from the upstream registry - (options: ${CYAN}--version${NC}, default: ${CYAN}always uses --arch auto${NC}) +${BGreen}-P/-p, --pull${NC} Pull a Docker image from the upstream registry + (options: ${CYAN}--version${NC}, default: ${CYAN}always uses --arch auto${NC}) - ${BGreen}-T/-t, --test${NC} Start the Docker image up after build or pull is complete - (default: ${CYAN}disabled or prompted${NC}) +${BGreen}-T/-t, --test${NC} Start the Docker image up after build or pull is complete + (default: ${CYAN}disabled or prompted${NC}) - ${BGreen}-W/-w, --wipe${NC} ${YELLOW}Hazardous:${NC} Delete all related Dockerfiles and Docker images - (default: ${CYAN}always prompted${NC}) +${BGreen}-W/-w, --wipe${NC} ${YELLOW}Hazardous:${NC} Delete all related Dockerfiles and Docker images + (default: ${CYAN}always prompted${NC}) - ${BGreen}-H/-h, --help${NC} Show this help message +${BGreen}-H/-h, --help${NC} Show this help message ${BYellow}Description:${NC} - This script helps to easily build and test Rhino Linux Docker images. + This script helps to easily build and test Rhino Linux Docker images, or pull + them upstream. Designed to be adaptable with other Ubuntu-based Docker builds. ${BYellow}Examples:${NC} - ${BPurple}${0##*/} -f${NC} + ${BPurple}${0##*/} -f${NC} - Creates the file ${BGreen}Dockerfile-RhinoLinux-${dateiniso}${NC} for building the image - ${BGreen}rhino-linux/docker:${dateiniso}${NC}, with instructions on how to build and run it. + Creates the file ${BGreen}Dockerfile-RhinoLinux-${dateiniso}${NC} for building the image + ${BGreen}rhino-linux/docker:${dateiniso}${NC}, with instructions on how to build and run it. - ${BYellow}Note:${NC} if no options are passed, this is the default function, but users - will be asked if they would like to build and test the image. + ${BYellow}Note:${NC} if no options are passed, this is the default function, but users + will be asked if they would like to build and test the image. - ${BPurple}${0##*/} -b -t -c -v 2023.4 -a x86_64${NC} + ${BPurple}${0##*/} -b -t -c -v 2023.4 -a x86_64${NC} - Builds and starts ${BGreen}amd64/rhino-linux/docker:2023.4${NC} from scratch. + Builds and starts ${BGreen}amd64/rhino-linux/docker:2023.4${NC} from scratch. - ${BYellow}Note:${NC} the version tag may not correlate with the actual Rhino Linux version. - This option is meant for easily publishing images for specific milestones. + ${BYellow}Note:${NC} the version tag may not correlate with the actual Rhino Linux version. + This option is meant for easily publishing images for specific milestones. - ${BPurple}${0##*/} -p -t -v latest${NC} + ${BPurple}${0##*/} -p -t -v latest${NC} - Pulls and starts ${BGreen}ghcr.io/rhino-linux/docker:latest${NC}. + Pulls and starts ${BGreen}ghcr.io/rhino-linux/docker:latest${NC}. ${BPurple}${0##*/}${NC} ${BCyan}0.1.2${NC}