intel-device-plugins-for-ku.../demo/build-image.sh
Mikko Ylinen 34b3570312 demo: use runc for buildah
Github crypto-perf/opae-nlb-demo image builds using buildah started
failing without a reason. While we could continue to debug the root
cause, let's admit the version is so old and a reasonable configuration
exists that makes the error go away: using BUILDAH_RUNTIME=runc just
like we use for the plugin images seems sufficient.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2024-07-23 10:54:33 +03:00

28 lines
576 B
Bash
Executable File

#!/bin/sh -e
IMG=$1
BUILDER=$2
DIR=$(basename $IMG)
if [ -z "$DIR" ]; then
(>&2 echo "Usage: $0 <image directory>")
exit 1
fi
if [ ! -d "$DIR" ]; then
(>&2 echo "Directory $DIR doesn't exist")
exit 1
fi
CWD=`dirname $0`
TAG=${TAG:-devel}
if [ -z "$BUILDER" -o "$BUILDER" = 'docker' -o "$BUILDER" = 'podman' ] ; then
${BUILDER} build --pull -t ${IMG}:${TAG} "$CWD/$DIR/"
elif [ "$BUILDER" = 'buildah' ] ; then
BUILDAH_RUNTIME=runc buildah bud --pull-always -t ${IMG}:${TAG} "$CWD/$DIR/"
else
(>&2 echo "Unknown builder $BUILDER")
exit 1
fi