Open luisdavim opened 7 months ago
Error: while extracting image layer
Apply this fix for udocker
to extract images properly in Android environment -
# Fix errors when extracting hardlinks from Docker images
# https://github.com/indigo-dc/udocker/issues/388#issuecomment-1527277800
UDOCKER_PATCH='
--- udocker/container/structure.py
+++ udocker.mod/container/structure.py
@@ -281,7 +281,7 @@
if Msg.level >= Msg.VER:
verbose = '\'v'\''
Msg().out("Info: extracting:", tarf, l=Msg.INF)
- cmd = ["tar", "-C", destdir, "-x" + verbose,
+ cmd = ["proot", "--link2symlink", "tar", "-C", destdir, "-x" + verbose,
"--one-file-system", "--no-same-owner", "--overwrite",
"--exclude=dev/*", "--exclude=etc/udev/devices/*",
"--no-same-permissions", r"--exclude=.wh.*",
'
TMP_PATCH_FILE="$(mktemp)"
patch -p0 --no-backup-if-mismatch -r "${TMP_PATCH_FILE}" -d "$(python -c "import sysconfig; print(sysconfig.get_path('platlib'))" 2>/dev/null || echo "${PREFIX}/lib/python3.11/site-packages")" 2>/dev/null >/dev/null <<< "${UDOCKER_PATCH}" || true
rm -rf "${TMP_PATCH_FILE}"
'qemu-x86_64' not found
Apply this fix for udocker
so that it finds qemu -
# Fix qemu not found errors that occurs when running non-native platform containers
UDOCKER_PATCH='
--- udocker/engine/base.py
+++ udocker.mod/engine/base.py
@@ -690,4 +690,4 @@
if not qemu_path:
Msg().err("Warning: qemu required but not available", l=Msg.WAR)
return ""
- return qemu_path if return_path else qemu_filename
+ return qemu_path if return_path else qemu_path
'
TMP_PATCH_FILE="$(mktemp)"
patch -p0 --no-backup-if-mismatch -r "${TMP_PATCH_FILE}" -d "$(python -c "import sysconfig; print(sysconfig.get_path('platlib'))" 2>/dev/null || echo "${PREFIX}/lib/python3.11/site-packages")" 2>/dev/null >/dev/null <<< "${UDOCKER_PATCH}" || true
rm -rf "${TMP_PATCH_FILE}"
fatal error: see
proot-arm64-4_8_0
You should use proot
provided by Termux.The one provided by udocker
doesn't work properly -
# Force use Termux provided proot
mkdir -p "${HOME}/.udocker/lib"
cat <<'EOF' > "${HOME}/.udocker/udocker.conf"
[DEFAULT]
use_proot_executable = /data/data/com.termux/files/usr/bin/proot
proot_link2symlink = True
verbose_level = 3
EOF
echo "2.9.9" > "${HOME}/.udocker/lib/VERSION"
# Create dummy VERSION to suppress redundant download of Android-incompatible udockertools
# https://github.com/indigo-dc/udocker/issues/376#issuecomment-1300626183
Thanks, I'll give this a try. Is there a way udocker could detect that it's in Termux and use different paths?
Maybe by checking if ${PREFIX}
is set and/or checking ${OSTYPE}
, or uname -o
$ echo $OSTYPE
linux-android
$ uname -o
Android
I'm getting the folloing error:
though I do have booth
qemu-system
andqemu-user
installed.I've tryed setting
root_path
but that doesn't seem to have any effect: