summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rwxr-xr-xutil/docker_build.sh8
-rwxr-xr-xutil/docker_cmd.sh8
2 files changed, 8 insertions, 8 deletions
diff --git a/util/docker_build.sh b/util/docker_build.sh
index 7e10a4f76b..8dce387320 100755
--- a/util/docker_build.sh
+++ b/util/docker_build.sh
@@ -20,13 +20,13 @@ if [ $# -gt 1 ]; then
20fi 20fi
21 21
22# Allow $RUNTIME to be overridden by the user as an environment variable 22# Allow $RUNTIME to be overridden by the user as an environment variable
23# Else check if either docker or podman exit and set them as runtime 23# Else check if either podman or docker exit and set them as runtime
24# if none are found error out 24# if none are found error out
25if [ -z "$RUNTIME" ]; then 25if [ -z "$RUNTIME" ]; then
26 if command -v docker >/dev/null 2>&1; then 26 if command -v podman >/dev/null 2>&1; then
27 RUNTIME="docker"
28 elif command -v podman >/dev/null 2>&1; then
29 RUNTIME="podman" 27 RUNTIME="podman"
28 elif command -v docker >/dev/null 2>&1; then
29 RUNTIME="docker"
30 else 30 else
31 errcho "Error: no compatible container runtime found." 31 errcho "Error: no compatible container runtime found."
32 errcho "Either podman or docker are required." 32 errcho "Either podman or docker are required."
diff --git a/util/docker_cmd.sh b/util/docker_cmd.sh
index f3c4c7804f..a179cef732 100755
--- a/util/docker_cmd.sh
+++ b/util/docker_cmd.sh
@@ -16,13 +16,13 @@ for arg; do
16done 16done
17 17
18# Allow $RUNTIME to be overridden by the user as an environment variable 18# Allow $RUNTIME to be overridden by the user as an environment variable
19# Else check if either docker or podman exit and set them as runtime 19# Else check if either podman or docker exit and set them as runtime
20# if none are found error out 20# if none are found error out
21if [ -z "$RUNTIME" ]; then 21if [ -z "$RUNTIME" ]; then
22 if command -v docker >/dev/null 2>&1; then 22 if command -v podman >/dev/null 2>&1; then
23 RUNTIME="docker"
24 elif command -v podman >/dev/null 2>&1; then
25 RUNTIME="podman" 23 RUNTIME="podman"
24 elif command -v docker >/dev/null 2>&1; then
25 RUNTIME="docker"
26 else 26 else
27 errcho "Error: no compatible container runtime found." 27 errcho "Error: no compatible container runtime found."
28 errcho "Either podman or docker are required." 28 errcho "Either podman or docker are required."