From 4887a524ff76172641622f64f195c46f493b58f4 Mon Sep 17 00:00:00 2001 From: Silvio Ankermann Date: Mon, 16 May 2022 15:08:20 +0200 Subject: [PATCH 1/2] Check for podman first --- imagefiles/dockcross.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/imagefiles/dockcross.sh b/imagefiles/dockcross.sh index 8bfeb2b..f777b80 100755 --- a/imagefiles/dockcross.sh +++ b/imagefiles/dockcross.sh @@ -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 From 2333930f42498cc112ad263854d90721240ba518 Mon Sep 17 00:00:00 2001 From: Silvio Ankermann Date: Mon, 16 May 2022 15:21:53 +0200 Subject: [PATCH 2/2] Fix permission errors with podman Fix #649 --- imagefiles/dockcross.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imagefiles/dockcross.sh b/imagefiles/dockcross.sh index f777b80..cb746fb 100755 --- a/imagefiles/dockcross.sh +++ b/imagefiles/dockcross.sh @@ -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