Improve container tool detection logic in build.sh for better reliability
This commit is contained in:
4
build.sh
4
build.sh
@@ -4,9 +4,9 @@ IMAGE_NAME="azure-image-chooser"
|
|||||||
#IMAGE="docker.io/skoszewski/$IMAGE_NAME"
|
#IMAGE="docker.io/skoszewski/$IMAGE_NAME"
|
||||||
IMAGE="skdomlab.azurecr.io/$IMAGE_NAME"
|
IMAGE="skdomlab.azurecr.io/$IMAGE_NAME"
|
||||||
|
|
||||||
if [ "$(basename $(command -v docker))" = "docker" ]; then
|
if [ ! -z "$(command -v docker)" ] && [ "$(basename $(command -v docker))" = "docker" ]; then
|
||||||
CMD="docker"
|
CMD="docker"
|
||||||
elif [ "$(basename $(command -v podman))" = "podman" ]; then
|
elif [ ! -z "$(command -v podman)" ] && [ "$(basename $(command -v podman))" = "podman" ]; then
|
||||||
CMD="podman"
|
CMD="podman"
|
||||||
else
|
else
|
||||||
echo "No suitable container tool found"
|
echo "No suitable container tool found"
|
||||||
|
|||||||
Reference in New Issue
Block a user