From: Sage Weil Date: Fri, 17 Apr 2020 22:05:26 +0000 (-0400) Subject: cstart.sh: work with docker or podman X-Git-Tag: v16.1.0~2537^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7eb29b3cd5f3ee0a7c6c36343c73f386b83ecc2d;p=ceph.git cstart.sh: work with docker or podman Signed-off-by: Sage Weil --- diff --git a/src/cstart.sh b/src/cstart.sh index 5baf85f88682..1c243b96e694 100755 --- a/src/cstart.sh +++ b/src/cstart.sh @@ -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