cstart.sh: work with docker or podman

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2020-04-17 18:05:26 -04:00
parent e94b553816
commit 7eb29b3cd5

View File

@ -2,6 +2,12 @@
image_base="quay.io/ceph-ci/ceph"
if which podman 2>&1 > /dev/null; then
runtime="podman"
else
runtime="docker"
fi
# fsid
if [ -e fsid ] ; then
fsid=`cat fsid`
@ -39,7 +45,7 @@ fi
echo "port $port"
# make sure we have an image
if ! podman image inspect $image_base:$shortid 2>/dev/null; then
if ! $runtime image inspect $image_base:$shortid 2>/dev/null; then
echo "building initial $image_base:$shortid image..."
sudo ../src/script/cpatch -t $image_base:$shortid
fi