Can't run hello-world test

So I know this is probably an incredibly niche edge case but I was hoping to get some help with getting docker working on my setup.

The issue: I’m getting the following error when trying to do the test run of hello-world after following the apt repository setup detailed here Ubuntu | Docker Docs

Note that sudo is not used for commands because I’m logged in as root already

Now for the odd system setup I have. I’m trying to setup docker inside of an instance of Ubuntu 24.04.3 hosted by the Termux application on my android phone (Pixel 8 Pro)

I don’t know if the setup will cause there to be any difference from a normal Ubuntu 24 system, but I thought it best to mention it just in case

The only additional changes beyond the linked instructions was that I edited /etc/init.d/docker so that the 3 ulimit lines set their respective values to what they already are since it was causing a different issue

Any help or advice would be greatly appreciated

Oh and for anyone curious as to why I’ve got this weird setup is because I originally wanted to do coding on my phone while out and about, but all the IDE options were disappointing. So I’ve got a web hosted version of VSCode that I run on the Linux VM which I can connect to using the normal browser on my phone. It works wonderfully and means I can have the same coding setup as my home desktop and work laptop.

I don’t have a Pixel phone. I heard that it is customizable, but in general, Docker was not made for running on a phone. The kernel and its capabilities are very important.

You can try running the docker daemon (dockerd) manually and see error messages on the screen. If you see nothing as you also saw nothing in the log file, I’m not sure what else you could do.

He could try to run the preflight check:

curl https://raw.githubusercontent.com/moby/moby/refs/heads/master/contrib/check-config.sh | bash

On an Ubuntu kernel, only the zfs related modules should be missing, and ipv6 related settings in the networks bridge should be disabled. Everything else should pass, as in: the kernel module exists and works.

Also uname -a should tell you which kernel actually is used. I can imagine that the Ubuntu instance on your phone already runs on some sort of container, and uses the kernel of the underlying Android os.

1 Like

Yeah I was worried that docker just wasn’t going to be compatible with this setup after the start command gave no feedback and the log was empty, but manually running dockerd has given me something to work with

The errors are very curious since there is only a root user on this Linux system with no sudo command

I’ve also confirmed that while I can look at the folder, the root user can’t get any details regarding the files themselves

Which is also the result for most of the files in the parent directory as well

I’m thinking the outer Termux system is probably stopping the inner Linux system from having control of those files

But this is a very good lead for further investigation

I also need to find out where the kernel config is for my Linux system, since it’s apparently not in the usual place

uname -a returns the following

Linux localhost 6.2.1-PRoot-Distro #1 SMP PREEMPT Wed Mar 12 13:40:07 UTC 2025 aarch64 aarch64 aarch64 GNU/Linux

It is hard to read logs on a screnshot, but I’m not sure how you could copy texts from a phone, so its okay.

It seems you don’t have the privileges to run a container engine on the phone.

Sorry I was mostly just highlighting the main warnings and errors I thought were relevant. I’m going to have a look to see if I can raise the permissions to resolve this but I need to do some more reading regarding how the main Termux program functions. If it’s possible, it’ll most likely be resolved there.

Here’s the full log for reference when running dockerd manually

root@localhost:~# dockerd                                                   INFO[2025-09-07T07:19:40.034167871+01:00] Starting up                                                                                                   INFO[2025-09-07T07:19:40.063542342+01:00] containerd not running, starting managed containerd                                                           INFO[2025-09-07T07:19:40.114303939+01:00] started new containerd process                address=/var/run/docker/containerd/containerd.sock module=libcontainerd pid=17769
INFO[2025-09-07T07:19:40.382496403+01:00] starting containerd                           revision=05044ec0a9a75232cad458027ca83437aae3f4da version=1.7.27
INFO[2025-09-07T07:19:40.479685246+01:00] loading plugin "io.containerd.snapshotter.v1.aufs"...  type=io.containerd.snapshotter.v1
INFO[2025-09-07T07:19:40.790779851+01:00] skip loading plugin "io.containerd.snapshotter.v1.aufs"...  error="open /proc/filesystems: permission denied: skip plugin" type=io.containerd.snapshotter.v1
INFO[2025-09-07T07:19:40.791266423+01:00] loading plugin "io.containerd.event.v1.exchange"...  type=io.containerd.event.v1
INFO[2025-09-07T07:19:40.791470687+01:00] loading plugin "io.containerd.internal.v1.opt"...  type=io.containerd.internal.v1
INFO[2025-09-07T07:19:40.809959986+01:00] loading plugin "io.containerd.warning.v1.deprecations"...  type=io.containerd.warning.v1
INFO[2025-09-07T07:19:40.810138737+01:00] loading plugin "io.containerd.snapshotter.v1.blockfile"...  type=io.containerd.snapshotter.v1
INFO[2025-09-07T07:19:40.814864039+01:00] skip loading plugin "io.containerd.snapshotter.v1.blockfile"...  error="no scratch file generator: skip plugin" type=io.containerd.snapshotter.v1
INFO[2025-09-07T07:19:40.815009994+01:00] loading plugin "io.containerd.snapshotter.v1.btrfs"...  type=io.containerd.snapshotter.v1
INFO[2025-09-07T07:19:40.821160140+01:00] skip loading plugin "io.containerd.snapshotter.v1.btrfs"...  error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs (f2fs) must be a btrfs filesystem to be used with the btrfs snapshotter: skip plugin" type=io.containerd.snapshotter.v1
INFO[2025-09-07T07:19:40.821356063+01:00] loading plugin "io.containerd.snapshotter.v1.devmapper"...  type=io.containerd.snapshotter.v1
INFO[2025-09-07T07:19:40.821711166+01:00] skip loading plugin "io.containerd.snapshotter.v1.devmapper"...  error="devmapper not configured: skip plugin" type=io.containerd.snapshotter.v1                                          INFO[2025-09-07T07:19:40.821888982+01:00] loading plugin "io.containerd.snapshotter.v1.native"...  type=io.containerd.snapshotter.v1                    INFO[2025-09-07T07:19:40.825637151+01:00] loading plugin "io.containerd.snapshotter.v1.overlayfs"...  type=io.containerd.snapshotter.v1                 INFO[2025-09-07T07:19:40.847690495+01:00] loading plugin "io.containerd.snapshotter.v1.zfs"...  type=io.containerd.snapshotter.v1                       INFO[2025-09-07T07:19:40.856046371+01:00] skip loading plugin "io.containerd.snapshotter.v1.zfs"...  error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.zfs must be a zfs filesystem to be used with the zfs snapshotter: skip plugin" type=io.containerd.snapshotter.v1
INFO[2025-09-07T07:19:40.856588363+01:00] loading plugin "io.containerd.content.v1.content"...  type=io.containerd.content.v1
INFO[2025-09-07T07:19:40.856716496+01:00] loading plugin "io.containerd.metadata.v1.bolt"...  type=io.containerd.metadata.v1
INFO[2025-09-07T07:19:40.860096989+01:00] metadata content store policy set             policy=shared
INFO[2025-09-07T07:19:40.893650334+01:00] loading plugin "io.containerd.gc.v1.scheduler"...  type=io.containerd.gc.v1
INFO[2025-09-07T07:19:40.894095687+01:00] loading plugin "io.containerd.differ.v1.walking"...  type=io.containerd.differ.v1
INFO[2025-09-07T07:19:40.894215235+01:00] loading plugin "io.containerd.lease.v1.manager"...  type=io.containerd.lease.v1
INFO[2025-09-07T07:19:40.894298853+01:00] loading plugin "io.containerd.streaming.v1.manager"...  type=io.containerd.streaming.v1
INFO[2025-09-07T07:19:40.894366073+01:00] loading plugin "io.containerd.runtime.v1.linux"...  type=io.containerd.runtime.v1
INFO[2025-09-07T07:19:40.900004908+01:00] loading plugin "io.containerd.monitor.v1.cgroups"...  type=io.containerd.monitor.v1
INFO[2025-09-07T07:19:40.909039210+01:00] loading plugin "io.containerd.runtime.v2.task"...  type=io.containerd.runtime.v2
INFO[2025-09-07T07:19:40.916215398+01:00] loading plugin "io.containerd.runtime.v2.shim"...  type=io.containerd.runtime.v2
INFO[2025-09-07T07:19:40.916308375+01:00] loading plugin "io.containerd.sandbox.store.v1.local"...  type=io.containerd.sandbox.store.v1
INFO[2025-09-07T07:19:40.916372950+01:00] loading plugin "io.containerd.sandbox.controller.v1.local"...  type=io.containerd.sandbox.controller.v1
INFO[2025-09-07T07:19:40.916414738+01:00] loading plugin "io.containerd.service.v1.containers-service"...  type=io.containerd.service.v1
INFO[2025-09-07T07:19:40.916474024+01:00] loading plugin "io.containerd.service.v1.content-service"...  type=io.containerd.service.v1
INFO[2025-09-07T07:19:40.916503931+01:00] loading plugin "io.containerd.service.v1.diff-service"...  type=io.containerd.service.v1
INFO[2025-09-07T07:19:40.916566268+01:00] loading plugin "io.containerd.service.v1.images-service"...  type=io.containerd.service.v1
INFO[2025-09-07T07:19:40.916619532+01:00] loading plugin "io.containerd.service.v1.introspection-service"...  type=io.containerd.service.v1
INFO[2025-09-07T07:19:40.916711491+01:00] loading plugin "io.containerd.service.v1.namespaces-service"...  type=io.containerd.service.v1
INFO[2025-09-07T07:19:40.916786117+01:00] loading plugin "io.containerd.service.v1.snapshots-service"...  type=io.containerd.service.v1
INFO[2025-09-07T07:19:40.916849878+01:00] loading plugin "io.containerd.service.v1.tasks-service"...  type=io.containerd.service.v1                     INFO[2025-09-07T07:19:40.917128362+01:00] loading plugin "io.containerd.grpc.v1.containers"...  type=io.containerd.grpc.v1
INFO[2025-09-07T07:19:40.917364974+01:00] loading plugin "io.containerd.grpc.v1.content"...  type=io.containerd.grpc.v1
INFO[2025-09-07T07:19:40.917436508+01:00] loading plugin "io.containerd.grpc.v1.diff"...  type=io.containerd.grpc.v1
INFO[2025-09-07T07:19:40.917498194+01:00] loading plugin "io.containerd.grpc.v1.events"...  type=io.containerd.grpc.v1
INFO[2025-09-07T07:19:40.917542872+01:00] loading plugin "io.containerd.grpc.v1.images"...  type=io.containerd.grpc.v1
INFO[2025-09-07T07:19:40.917577662+01:00] loading plugin "io.containerd.grpc.v1.introspection"...  type=io.containerd.grpc.v1
INFO[2025-09-07T07:19:40.917637883+01:00] loading plugin "io.containerd.grpc.v1.leases"...  type=io.containerd.grpc.v1
INFO[2025-09-07T07:19:40.917674708+01:00] loading plugin "io.containerd.grpc.v1.namespaces"...  type=io.containerd.grpc.v1
INFO[2025-09-07T07:19:40.917718205+01:00] loading plugin "io.containerd.grpc.v1.sandbox-controllers"...  type=io.containerd.grpc.v1
INFO[2025-09-07T07:19:40.918120508+01:00] loading plugin "io.containerd.grpc.v1.sandboxes"...  type=io.containerd.grpc.v1
INFO[2025-09-07T07:19:40.918289413+01:00] loading plugin "io.containerd.grpc.v1.snapshots"...  type=io.containerd.grpc.v1
INFO[2025-09-07T07:19:40.918344752+01:00] loading plugin "io.containerd.grpc.v1.streaming"...  type=io.containerd.grpc.v1
INFO[2025-09-07T07:19:40.918384140+01:00] loading plugin "io.containerd.grpc.v1.tasks"...  type=io.containerd.grpc.v1
INFO[2025-09-07T07:19:40.918425318+01:00] loading plugin "io.containerd.transfer.v1.local"...  type=io.containerd.transfer.v1
INFO[2025-09-07T07:19:40.918780502+01:00] loading plugin "io.containerd.grpc.v1.transfer"...  type=io.containerd.grpc.v1
INFO[2025-09-07T07:19:40.918838811+01:00] loading plugin "io.containerd.grpc.v1.version"...  type=io.containerd.grpc.v1
INFO[2025-09-07T07:19:40.918869410+01:00] loading plugin "io.containerd.internal.v1.restart"...  type=io.containerd.internal.v1
INFO[2025-09-07T07:19:40.927527531+01:00] loading plugin "io.containerd.tracing.processor.v1.otlp"...  type=io.containerd.tracing.processor.v1
INFO[2025-09-07T07:19:40.930115585+01:00] skip loading plugin "io.containerd.tracing.processor.v1.otlp"...  error="skip plugin: tracing endpoint not configured" type=io.containerd.tracing.processor.v1                            INFO[2025-09-07T07:19:40.930357772+01:00] loading plugin "io.containerd.internal.v1.tracing"...  type=io.containerd.internal.v1                         INFO[2025-09-07T07:19:40.931740300+01:00] skip loading plugin "io.containerd.internal.v1.tracing"...  error="skip plugin: tracing endpoint not configured" type=io.containerd.internal.v1
INFO[2025-09-07T07:19:40.931873519+01:00] loading plugin "io.containerd.grpc.v1.healthcheck"...  type=io.containerd.grpc.v1                             INFO[2025-09-07T07:19:40.932013249+01:00] loading plugin "io.containerd.nri.v1.nri"...  type=io.containerd.nri.v1
INFO[2025-09-07T07:19:40.932175766+01:00] NRI interface is disabled by configuration.
INFO[2025-09-07T07:19:40.955701604+01:00] serving...                                    address=/run/docker/containerd/containerd-debug.sock
INFO[2025-09-07T07:19:40.962904566+01:00] serving...                                    address=/run/docker/containerd/containerd.sock.ttrpc
INFO[2025-09-07T07:19:40.970786687+01:00] serving...                                    address=/run/docker/containerd/containerd.sock
INFO[2025-09-07T07:19:40.971504826+01:00] containerd successfully booted in 0.622111s
INFO[2025-09-07T07:19:41.010886540+01:00] OTEL tracing is not configured, using no-op tracer provider
INFO[2025-09-07T07:19:41.016235499+01:00] CDI directory does not exist, skipping: failed to monitor for changes: no such file or directory  dir=/etc/cdi
INFO[2025-09-07T07:19:41.016320419+01:00] CDI directory does not exist, skipping: failed to monitor for changes: no such file or directory  dir=/var/run/cdi
WARN[2025-09-07T07:19:41.018650660+01:00] unable to modify root key limit, number of containers could be limited by this quota: open /proc/sys/kernel/keys/root_maxkeys: permission denied
WARN[2025-09-07T07:19:41.306760605+01:00] Failed to configure golang's threads limit: open /proc/sys/kernel/threads-max: permission denied
INFO[2025-09-07T07:19:41.328052556+01:00] Creating a containerd client                  address=/var/run/docker/containerd/containerd.sock timeout=1m0s WARN[2025-09-07T07:19:41.407346420+01:00] open /sys/fs/cgroup/cgroup.controllers: permission denied                                                     ERRO[2025-09-07T07:19:41.475274968+01:00] failed to mount overlay: function not implemented  storage-driver=overlay2
ERRO[2025-09-07T07:19:41.487560776+01:00] exec: "fuse-overlayfs": executable file not found in $PATH  storage-driver=fuse-overlayfs
WARN[2025-09-07T07:19:41.512234970+01:00] Unable to setup quota: no such file or directory
INFO[2025-09-07T07:19:41.567179224+01:00] Loading containers: start.        
ERRO[2025-09-07T07:19:41.598615992+01:00] could not get initial namespace: no such file or directory
WARN[2025-09-07T07:19:41.599891871+01:00] Could not load necessary modules for IPSEC rules: permission denied
WARN[2025-09-07T07:19:42.320760849+01:00] Could not load necessary modules for Conntrack: permission denied
ERRO[2025-09-07T07:19:42.335082749+01:00] could not create netlink handle on initial namespace: permission denied
INFO[2025-09-07T07:19:42.340863917+01:00] stopping event stream following graceful shutdown  error="context canceled" module=libcontainerd namespace=moby
INFO[2025-09-07T07:19:42.341250270+01:00] stopping event stream following graceful shutdown  error="context canceled" module=libcontainerd namespace=plugins.moby
INFO[2025-09-07T07:19:42.341558497+01:00] stopping healthcheck following graceful shutdown  module=libcontainerd
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x3000d9a534]

goroutine 1 [running, locked to thread]:
github.com/vishvananda/netlink.(*Handle).SetSocketTimeout(0x300303e5a0?, 0x300246fd2b?)
        /root/build-deb/engine/vendor/github.com/vishvananda/netlink/handle_linux.go:63 +0x94
github.com/docker/docker/libnetwork/ns.Init()
        /root/build-deb/engine/libnetwork/ns/init_linux.go:34 +0x130        sync.(*Once).doSlow(0x0?, 0x0?)
        /usr/local/go/src/sync/once.go:78 +0xf0                             sync.(*Once).Do(...)
        /usr/local/go/src/sync/once.go:69                                   github.com/docker/docker/libnetwork/ns.NlHandle(...)
        /root/build-deb/engine/libnetwork/ns/init_linux.go:53               github.com/docker/docker/libnetwork/drivers/bridge.newDriver(0x40005b5f00)
        /root/build-deb/engine/libnetwork/drivers/bridge/bridge_linux.go:184 +0x44
github.com/docker/docker/libnetwork/drivers/bridge.Register({0x3003013fa0, 0x4000994110}, 0xd?, 0x4000996540)
        /root/build-deb/engine/libnetwork/drivers/bridge/bridge_linux.go:191 +0x2c
github.com/docker/docker/libnetwork.registerNetworkDrivers({0x3003013fa0, 0x4000994110}, 0x40005b5f00, 0x40006f4798)
        /root/build-deb/engine/libnetwork/drivers_linux.go:34 +0x17c        github.com/docker/docker/libnetwork.New({0x300303e708, 0x40006f8d20}, {0x40003be4d0, 0x9, 0xe})                                                                 /root/build-deb/engine/libnetwork/controller.go:180 +0x3bc
github.com/docker/docker/daemon.(*Daemon).initNetworkController(0x4000712008, 0x400048c008, 0x40006f8c30)
        /root/build-deb/engine/daemon/daemon_unix.go:856 +0x144
github.com/docker/docker/daemon.(*Daemon).restore(0x4000712008, 0x400048c008)
        /root/build-deb/engine/daemon/daemon.go:530 +0x514
github.com/docker/docker/daemon.NewDaemon({0x300303e740, 0x40004ee0f0}, 0x40002e7608, 0x400056e720, 0x40000ad500)
        /root/build-deb/engine/daemon/daemon.go:1176 +0x2658
main.(*daemonCLI).start(0x40001ce230, {0x300303e610, 0x300462c700})                 /root/build-deb/engine/cmd/dockerd/daemon.go:265 +0xafc
main.runDaemon(...)
        /root/build-deb/engine/cmd/dockerd/docker_unix.go:13
main.newDaemonCommand.func1(0x400071c008, {0x300462c700?, 0x7?, 0x3002393dc1?})
        /root/build-deb/engine/cmd/dockerd/docker.go:49 +0xc4               github.com/spf13/cobra.(*Command).execute(0x400071c008, {0x400018a070, 0x0, 0x0})
        /root/build-deb/engine/vendor/github.com/spf13/cobra/command.go:1015 +0x844
github.com/spf13/cobra.(*Command).ExecuteC(0x400071c008)                            /root/build-deb/engine/vendor/github.com/spf13/cobra/command.go:1148 +0x384                                                                     github.com/spf13/cobra.(*Command).Execute(...)
        /root/build-deb/engine/vendor/github.com/spf13/cobra/command.go:1071
github.com/spf13/cobra.(*Command).ExecuteContext(...)                               /root/build-deb/engine/vendor/github.com/spf13/cobra/command.go:1064
main.main()
        /root/build-deb/engine/cmd/dockerd/docker.go:135 +0x1f0

After a bit more searching it seems that getting docker to work in Termux requires either rooting the phone or doing a lot of faffing around with alternative Linux installs. So while it was worth trying, I think I’ll stick to just using docker on my desktop

Thanks all for the help regardless, it’s always nice to get a friendly first experience with a new community

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.