4
0
Fork 0

Remove "v"-Prefix for $ALPINE_BRANCH Environment Variable (#1)

* 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 <benjamin@boehmke.net>
This commit is contained in:
Robin Röper 2021-01-16 15:54:30 +01:00 committed by GitHub
parent 3566ec49fd
commit 6b9faa4506
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -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 |

View File

@ -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 <<EOF
${ALPINE_MIRROR}/v${ALPINE_BRANCH}/main
${ALPINE_MIRROR}/v${ALPINE_BRANCH}/community
${ALPINE_MIRROR}/${ALPINE_BRANCH}/main
${ALPINE_MIRROR}/${ALPINE_BRANCH}/community
EOF
# copy apk keys to new root (required for initial apk add run)