diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:53:30 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:53:30 +0000 |
commit | 2c7cac91ed6e7db0f6937923d2b57f97dbdbc337 (patch) | |
tree | c05dc0f8e6aa3accc84e3e5cffc933ed94941383 /docker/ubi-8/build.sh | |
parent | Initial commit. (diff) | |
download | frr-2c7cac91ed6e7db0f6937923d2b57f97dbdbc337.tar.xz frr-2c7cac91ed6e7db0f6937923d2b57f97dbdbc337.zip |
Adding upstream version 8.4.4.upstream/8.4.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | docker/ubi-8/build.sh | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/docker/ubi-8/build.sh b/docker/ubi-8/build.sh new file mode 100755 index 0000000..0216636 --- /dev/null +++ b/docker/ubi-8/build.sh @@ -0,0 +1,46 @@ +#!/bin/sh + +set -e + +## +# Package version needs to be decimal +## +DISTRO=ubi-8 + +GITREV="$2" +if [ -z "$GITREV" ];then + GITREV="$(git rev-parse --short=10 HEAD)" +fi + +FRR_IMAGE_TAG="$1" +if [ -z $FRR_IMAGE_TAG ];then + FRR_IMAGE_TAG="frr:ubi-8-$GITREV" +fi +PKGVER="$(printf '%u\n' 0x$GITREV)" + +FRR_RELEASE="$3" +if [ -z $FRR_RELEASE ];then + FRR_RELEASE=$(git describe --tags --abbrev=0) +fi + +FRR_NAME=$4 +if [ -z $FRR_NAME ];then + FRR_NAME=frr +fi + +FRR_VENDOR=$5 +if [ -z $FRR_VENDOR ];then + FRR_VENDOR=frr +fi + +docker build \ + --cache-from="frr:$DISTRO-builder-$GITREV" \ + --file=docker/$DISTRO/Dockerfile \ + --build-arg="PKGVER=$PKGVER" \ + --build-arg="FRR_IMAGE_TAG=$FRR_IMAGE_TAG" \ + --build-arg="FRR_RELEASE=$FRR_RELEASE" \ + --build-arg="FRR_NAME=$FRR_NAME" \ + --build-arg="FRR_VENDOR=$FRR_VENDOR" \ + --tag="$FRR_IMAGE_TAG" \ + . + |