termux-packages
termux-packages copied to clipboard
[Bug]: docker/containerd
Problem description
Hello, since the last update docker seems to have stopped working
It looks like containerd is not able to bind its socket
What steps will reproduce the bug?
- Start dockerd
- Start any docker container:
sudo docker run -it --rm hello-world
What is the expected behavior?
The docker container should run without errors
System information
termux -info:
Termux Variables:
TERMUX_API_APP__VERSION_NAME=0.50.1+b732327
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP__AM_SOCKET_SERVER_ENABLED=true
TERMUX_APP__APK_PATH=/data/app/~~EgdQ6T7bwrQjrTYC3TsnaA==/com.termux-Xq35YM-EIL7By84ETYPXLQ==/base.apk
TERMUX_APP__APK_RELEASE=GITHUB
TERMUX_APP__FILES_DIR=/data/user/0/com.termux/files
TERMUX_APP__IS_DEBUGGABLE_BUILD=true
TERMUX_APP__IS_INSTALLED_ON_EXTERNAL_STORAGE=false
TERMUX_APP__PACKAGE_MANAGER=apt
TERMUX_APP__PACKAGE_NAME=com.termux
TERMUX_APP__PACKAGE_VARIANT=apt-android-7
TERMUX_APP__PID=8624
TERMUX_APP__SE_FILE_CONTEXT=u:object_r:app_data_file:s0:c162,c257,c512,c768
TERMUX_APP__SE_INFO=default:targetSdkVersion=28:complete
TERMUX_APP__SE_PROCESS_CONTEXT=u:r:untrusted_app_27:s0:c162,c257,c512,c768
TERMUX_APP__TARGET_SDK=28
TERMUX_APP__UID=10418
TERMUX_APP__USER_ID=0
TERMUX_APP__VERSION_CODE=118
TERMUX_APP__VERSION_NAME=0.118.0+e2f0edf
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0+e2f0edf
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://packages-cf.termux.dev/apt/termux-main/ stable main
# root-repo (sources.list.d/root.list)
deb https://packages-cf.termux.dev/apt/termux-root/ root stable
# x11-repo (sources.list.d/x11.list)
deb https://packages-cf.termux.dev/apt/termux-x11/ x11 main
Updatable packages:
All packages up to date
termux-tools version:
1.39.3
Android version:
13
Kernel build information:
Linux localhost 5.10.194-Massi+ #3 SMP PREEMPT Wed Oct 25 17:45:06 CEST 2023 aarch64 Android
Device manufacturer:
Xiaomi
Device model:
23049PCD8G
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
Installed termux plugins:
com.termux.api versionCode:51
I have the same question.
same
switched to docker inside alpine chroot
build runc with patch https://raw.githubusercontent.com/termux/termux-packages/master/root-packages/runc/cg-cpuset-noprefix-compat.patch
fix for docker: failed to register layer: Error processing tar file remount /, flags: 0x84000: invalid argument.
#replace rootfs with whatever you have
#before chroot
mount --bind rootfs rootfs
cd rootfs
mount ...
chroot ...
fix for iptables (if you have errors)
replace iptables binary with
#!/bin/sh
nsenter -t 1 -m iptables ${@}
same
may be unix socket path too long https://github.com/golang/go/issues/6895#issue-51285889
@Grimler91 Could it be that the issue described in https://github.com/termux/termux-packages/commit/8680546c85f3f86eb1888ecb4431032beb07af9c is not fixed with reverting to the older version?
This issue can be fixed by moving docker directories either under /data/data/com.termux
or even /data/docker
. The idea behind is to reduce path as much as possible. Otherwise Unix socket path will exceed 108 characters limit and we'll see the error.
A possible temporary solution is to install a previous version of containerd
This issue can be fixed by moving docker directories either under
/data/data/com.termux
or even/data/docker
. The idea behind is to reduce path as much as possible. Otherwise Unix socket path will exceed 108 characters limit and we'll see the error.
@sylirre,
More precisely, the bundle.go.patch should change socketRoot to /data/docker/run/containerd
rather than @TERMUX_PREFIX@/var/run/containerd
in runtime/v1/linux/bundle.go
. Also, in runtime/v2/linux/bundle.go
the socket root should also be /data/docker/run/containerd
rather than default.DefaultStateDir
. (The latter requires the import of containerd/defaults to be removed or commented out.)
Any updates?
A possible temporary solution is to install a previous version of containerd
I also ran into this issue and this link seems dead :( Does anyone still have this package?