Merge pull request #689 from Lykos153/improve-podman-support

Improve podman support
This commit is contained in:
Bensuperpc 2022-05-16 23:44:48 +02:00 committed by GitHub
commit 8328c514c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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