From 6b9faa45067db7821d3309f42fcfa6b0bbead68c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20R=C3=B6per?= Date: Sat, 16 Jan 2021 15:54:30 +0100 Subject: [PATCH] Remove "v"-Prefix for $ALPINE_BRANCH Environment Variable (#1) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Remove "v"-Prefix for $ALPINE_BRANCH Environment Variable This allows usage of Alpine Branches like "edge" * Add "v" notation * Add prefix as described in README.md * Update Links in README Co-authored-by: Benjamin Böhmke --- README.md | 2 +- resources/build.sh | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 45feda5..ea66d94 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ builder. | Variable | Default Value | Description | | --------------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------------- | -| ALPINE_BRANCH | 3.11 | [Alpine Branch](https://wiki.alpinelinux.org/wiki/Alpine_Linux:Releases) to use for image | +| ALPINE_BRANCH | v3.11 | [Alpine Branch](https://alpinelinux.org/releases) to use for image | | ALPINE_MIRROR | http://dl-cdn.alpinelinux.org/alpine | Mirror used for package download | | CUSTOM_IMAGE_SCRIPT | image.sh | Name of script for image customizations (relative to input dir) | | DEFAULT_DROPBEAR_ENABLED | true | True to enable SSH server by default | diff --git a/resources/build.sh b/resources/build.sh index 291133f..93ad0c2 100755 --- a/resources/build.sh +++ b/resources/build.sh @@ -4,7 +4,7 @@ set -e # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # User config # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -: ${ALPINE_BRANCH:="3.11"} +: ${ALPINE_BRANCH:="v3.11"} : ${ALPINE_MIRROR:="http://dl-cdn.alpinelinux.org/alpine"} : ${DEFAULT_TIMEZONE:="Etc/UTC"} @@ -24,6 +24,7 @@ set -e : ${INPUT_PATH:="/input"} : ${CUSTOM_IMAGE_SCRIPT:="image.sh"} +ALPINE_BRANCH=$(echo $ALPINE_BRANCH | sed '/^[0-9]/s/^/v/') # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # static config @@ -66,8 +67,8 @@ echo ">> Prepare root FS" # update local repositories to destination ones to ensure the right packages where installed cat >/etc/apk/repositories <