Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: docker/containerd #18359

Open
MassiWho opened this issue Oct 27, 2023 · 13 comments
Open

[Bug]: docker/containerd #18359

MassiWho opened this issue Oct 27, 2023 · 13 comments
Labels
bug report Something is not working properly root Issue is related to stuff requiring root permissions or root-packages

Comments

@MassiWho
Copy link

Problem description

Hello, since the last update docker seems to have stopped working
Screenshot_20231027-162803_crDroid Home
It looks like containerd is not able to bind its socket

What steps will reproduce the bug?

  1. Start dockerd
  2. 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

@MassiWho MassiWho added bug report Something is not working properly untriaged labels Oct 27, 2023
@licy183 licy183 removed the untriaged label Oct 29, 2023
@hellolxc
Copy link

hellolxc commented Nov 3, 2023

I have the same question.

@yqxyz
Copy link

yqxyz commented Nov 13, 2023

same

@romanovj
Copy link

romanovj commented Nov 14, 2023

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 ${@}

@PowerPlop
Copy link

same

@zzc10086
Copy link

zzc10086 commented Nov 16, 2023

may be unix socket path too long
golang/go#6895 (comment)

@PowerPlop
Copy link

@Grimler91 Could it be that the issue described in 8680546 is not fixed with reverting to the older version?

@sylirre
Copy link
Member

sylirre commented Nov 23, 2023

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.

@5kind
Copy link

5kind commented Nov 28, 2023

A possible temporary solution is to install a previous version of containerd

@ygottlieb-peratonlabs-com

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.)

@aikooo7
Copy link

aikooo7 commented Jul 19, 2024

Any updates?

@stale stale bot removed the inactive No activity in a certain period of time label Jul 19, 2024
@Lemin2
Copy link

Lemin2 commented Aug 16, 2024

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?

@spiral009
Copy link

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?

Where's it

@chribro88
Copy link

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?

See this comment

@truboxl truboxl added the root Issue is related to stuff requiring root permissions or root-packages label Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Something is not working properly root Issue is related to stuff requiring root permissions or root-packages
Projects
None yet
Development

No branches or pull requests