Merge commit '8328c514c1628799a65797aa06fcb370ebe576aa'

* commit '8328c514c1628799a65797aa06fcb370ebe576aa':
  Fix permission errors with podman
  Check for podman first
This commit is contained in:
Paolo Bosetti 2022-05-18 13:27:22 +02:00
commit 28a082f364

View File

@ -24,10 +24,10 @@ has() {
# If OCI_EXE is not already set, search for a container executor (OCI stands for "Open Container Initiative")
if [ -z "$OCI_EXE" ]; then
if which docker >/dev/null 2>/dev/null; then
OCI_EXE=docker
elif which podman >/dev/null 2>/dev/null; then
if which podman >/dev/null 2>/dev/null; then
OCI_EXE=podman
elif which docker >/dev/null 2>/dev/null; then
OCI_EXE=docker
else
die "Cannot find a container executor. Search for docker and podman."
fi
@ -190,7 +190,7 @@ MSYS=$([ -e /proc/version ] && grep -l MINGW /proc/version || echo "")
# CYGWIN
CYGWIN=$([ -e /proc/version ] && grep -l CYGWIN /proc/version || echo "")
if [ -z "$UBUNTU_ON_WINDOWS" -a -z "$MSYS" ]; then
if [ -z "$UBUNTU_ON_WINDOWS" -a -z "$MSYS" -a "$OCI_EXE" != "podman" ]; then
USER_IDS=(-e BUILDER_UID="$( id -u )" -e BUILDER_GID="$( id -g )" -e BUILDER_USER="$( id -un )" -e BUILDER_GROUP="$( id -gn )")
fi