diff options
author | Stephen Worley <sworley@nvidia.com> | 2022-01-04 19:14:51 +0100 |
---|---|---|
committer | Stephen Worley <sworley@nvidia.com> | 2022-01-04 19:14:51 +0100 |
commit | 3728cc8e12c7504b0508ccd4008516e839a2bf18 (patch) | |
tree | 070bc01e3a014a6186848db98bfd1568da9c4004 /docker | |
parent | Merge pull request #10274 from anlancs/fix-spell-error-bfd (diff) | |
download | frr-3728cc8e12c7504b0508ccd4008516e839a2bf18.tar.xz frr-3728cc8e12c7504b0508ccd4008516e839a2bf18.zip |
docker: update alpine build enable set own version
Add ability to set your own env for the version of the docker
container alpine image. This is useful for applications like GNS3
who pin a specific version to look for when they boot up. When you build
locally to test your code you can just set the version to 0 so you don't
have to update configs/scripts looking for a specific image version.
Also fix a shebang in docker start for alpine.
Signed-off-by: Stephen Worley <sworley@nvidia.com>
Diffstat (limited to 'docker')
-rwxr-xr-x | docker/alpine/build.sh | 10 | ||||
-rwxr-xr-x | docker/alpine/docker-start | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/docker/alpine/build.sh b/docker/alpine/build.sh index 22a36877c..3132feb9f 100755 --- a/docker/alpine/build.sh +++ b/docker/alpine/build.sh @@ -6,7 +6,15 @@ set -x ## # Package version needs to be decimal ## -GITREV="$(git rev-parse --short=10 HEAD)" + +## +# Set GITREV=0 or similar in ENV if you want the tag to just be updated to -0 +# everytime for automation usage/scripts/etc locally. +# +# Ex) GITREV=0 ./build.sh +## + +GITREV="${GITREV:=$(git rev-parse --short=10 HEAD)}" PKGVER="$(printf '%u\n' 0x$GITREV)" docker build \ diff --git a/docker/alpine/docker-start b/docker/alpine/docker-start index 698f4f93c..995cea411 100755 --- a/docker/alpine/docker-start +++ b/docker/alpine/docker-start @@ -1,4 +1,4 @@ -#!/bin/ash +#!/bin/bash if [ -r "/lib/lsb/init-functions" ]; then . /lib/lsb/init-functions |