Browse Source

Pr/reorder docker podman check (#19561)

pull/19590/head 0.19.9
Renegade-Master 1 year ago
committed by GitHub
parent
commit
3f2cbc9e68
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions
  1. +4
    -4
      util/docker_build.sh
  2. +4
    -4
      util/docker_cmd.sh

+ 4
- 4
util/docker_build.sh View File

@ -20,13 +20,13 @@ if [ $# -gt 1 ]; then
fi
# Allow $RUNTIME to be overridden by the user as an environment variable
# Else check if either docker or podman exit and set them as runtime
# Else check if either podman or docker exit and set them as runtime
# if none are found error out
if [ -z "$RUNTIME" ]; then
if command -v docker >/dev/null 2>&1; then
RUNTIME="docker"
elif command -v podman >/dev/null 2>&1; then
if command -v podman >/dev/null 2>&1; then
RUNTIME="podman"
elif command -v docker >/dev/null 2>&1; then
RUNTIME="docker"
else
errcho "Error: no compatible container runtime found."
errcho "Either podman or docker are required."


+ 4
- 4
util/docker_cmd.sh View File

@ -16,13 +16,13 @@ for arg; do
done
# Allow $RUNTIME to be overridden by the user as an environment variable
# Else check if either docker or podman exit and set them as runtime
# Else check if either podman or docker exit and set them as runtime
# if none are found error out
if [ -z "$RUNTIME" ]; then
if command -v docker >/dev/null 2>&1; then
RUNTIME="docker"
elif command -v podman >/dev/null 2>&1; then
if command -v podman >/dev/null 2>&1; then
RUNTIME="podman"
elif command -v docker >/dev/null 2>&1; then
RUNTIME="docker"
else
errcho "Error: no compatible container runtime found."
errcho "Either podman or docker are required."


Loading…
Cancel
Save