In Termux host unrooted, I would like to use docker, so I can use distrobox, to install miniforge3 (conda)

Hi

In my Termux host environment, unrooted, I would really like to use docker, so I may use distrobox, for example, in order to install miniforge3 (conda), for example, and associated projects. I already have a number of chroots, of proot-distro alias distributions, and miniforge3 (conda) therein, has been a revelation in my Debian chroot, through proot. Is realising this possible?

Any assistance greatly appreciated.

Thanking you in anticipation
Beauford

I must admit, I didn’t understand anything from your post. Do you mind rephrasing it?

1 Like

Sure, I can rephrase my question. I would like to be able to use Docker within Termux (a terminal emulator that extends Android’s functionality with a Linux userland), in an unrooted (a device without super-user/administrative privileges) Android portable hand-held device. Is this possible? Also, is it possible to use Docker in a proot (a pseudo or proxy root) chroot (a containerised/jail guest environment, that shares resources with the host)? On the one Android device with Termux extensibility, apart from the main Termux host Linux userland environment, I currently have an additional seven (7) GNU/Linux proot chroots, all for different usecases: two (2) Debian, (2) two Fedora, Kali NetHunter Rootless, Arch and Ubuntu. Can I run Docker in them?

I hope this is clearer, the second time around. If you require further clarification, please do not hesitate to ask.

It is clearer. But I have no answers to these questions.

Have you considered raising an issue in the Moby Github repository and asking there?

Hi,
Yes, it works (both, on rooted and non-rooted devices)…

A) on rooted devices [something] like this; (FYI: Warning [!] → only for expert users; there are/might be some [kernel] bugs, you might “brick” your phone if unlucky → see the issues there and consider making some adjustments /modifications, i.e. you might need to check it and/or fix it first):

B) for non-rooted devices [in Termux; via QEMU]
(+ concerning the Proot-distro[s], usually/ under normal circumstances it should work on/in all of them [i.e. export/share env.path with/to Proot so you can run it directly from Proot, and/or you can run qemu there → nevertheless compare/consider the performance [penalty]/ overhead.
It works on non-rooted device[s] (usually)…
…The networking might be tricky [sometimes], though → read the documentation first, it took me a while to make it right)…

FYI: some “alpine docker” [or similar] image in termux is the usual way… (there are more of them on github)…

FYI2: so far I tested (briefly) this/these:
Docker (i.e. alpine docker img.) =>

[Currently running] => Portainer + Caddy+ Prometheus+ Grafana + [more/ etc.]…
(Ansible, Authelia, Traefik, etc. should also work).


If it is ok in Termux, it will be/should be ok in the Proot [distro(s)] as well… (use the same/similar logic, it should work)…
(Tested on: S10+, Android 12, non-rooted, i.e. phone status official).

Pro tips →

  1. debloat your device first,
  2. optimize
  3. find a way to secure/harden “the setup” (by default it is not sufficient there, especially Proot is “hell” concerning the security → no
    web browsing/browsers via Proot recommended [yet], use Andr.app. ver. and/ or via Dex and/or share the env. path to/ with Proot and run the app from Proot → i.e. not the browser there)…
1 Like

You can try some/ one of these:

Via

and/ or
https://github.com/orgs/alpinelinux/repositories
(FYI: there are more options available)

…etc…