Update build.sh

use buildah or podman instead of docker if available
This commit is contained in:
Subhendu Ghosh 2019-11-20 07:24:35 -05:00 committed by GitHub
parent f915352138
commit 703742d7cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,7 +17,18 @@ SHA=$( git rev-parse --short HEAD )
git checkout $SHA
REPO=quay.io/quay/quay:$SHA
docker build -t $REPO .
# Use buildah or podman or docker
if [ -x /usr/bin/buildah ]; then
BUILDER="/usr/bin/buildah bud"
elif [ -x /usr/bin/podman ]; then
BUILDER="/usr/bin/podman build"
elif [ -x /usr/bin/docker ] ; then
BUILDER="/usr/bin/docker build"
fi
echo $BUILDER
$BUILDER -t $REPO .
echo $REPO
git checkout "$NAME"