How termux/proot-distro works
PRoot-Distro manages rootless Linux containers: users install registry images or local archives, enter or run commands inside them, and manage their lifecycle. It also supports Dockerfile builds and registry publishing, plus search, backup/restore, file transfer, and session management. The graph combines README-documented capabilities with relationships visible in sampled source and the SOURCE INDEX; several command implementations were not sampled, so their internal connections are not inferred.
Main entry points: pull.py Registry pull · install.py Install image · search.py Registry search · restore.py Restore archive
Components 26
Image acquisition
- Install image
proot_distro/commands/install.py - Install archive
proot_distro/commands/install_local.py - Registry search
proot_distro/helpers/docker/search.py - Registry pull
proot_distro/helpers/docker/pull.py - Registry transport
proot_distro/helpers/docker/transport.py - HTTP downloads
proot_distro/helpers/download.py - Image cache
proot_distro/helpers/docker/cache.py - Layer extraction
proot_distro/helpers/tar_extract.py
Container runtime
- proot runtime
- Login session
proot_distro/commands/login/__init__.py - proot command
proot_distro/commands/login/proot_cmd.py - Session registry
proot_distro/session.py
Image build and publish
- Build command
proot_distro/commands/build.py - Dockerfile engine
proot_distro/helpers/build_engine/engine.py - Build handlers
proot_distro/helpers/build_engine/handlers.py - Build copy step
proot_distro/helpers/build_engine/copy_step.py - Registry push
proot_distro/helpers/docker/push.py
Container management
- Container lifecycle
proot_distro/commands/remove.py - Backup archive
proot_distro/commands/backup.py - Restore archive
proot_distro/commands/restore.py - File transfer
proot_distro/commands/sync.py - Filesystem safety
proot_distro/dirfd.py - State and paths
proot_distro/paths.py
Other components
- User
- CLI entry
- OCI registry
Connections 32
- User → CLI entry: invokes
- CLI entry → Install image: selects command
- CLI entry → Install archive: selects command
- CLI entry → Registry search: selects search
- Install image → Registry pull: pulls image
- Registry pull → Registry transport: requests registry
proot_distro/helpers/docker/pull.py - Registry pull → HTTP downloads: downloads blobs
proot_distro/helpers/docker/pull.py - Registry search → Registry transport: queries registry
proot_distro/helpers/docker/search.py - Registry search → HTTP downloads: fetches data
proot_distro/helpers/docker/search.py - Registry transport → OCI registry: sends requests
proot_distro/helpers/docker/transport.py - Registry pull → OCI registry: fetches image
- Registry pull → Image cache: caches manifests
proot_distro/helpers/docker/pull.py - Install archive → Layer extraction: extracts archive
- Install image → Layer extraction: assembles layers
- Login session → proot command: builds invocation
proot_distro/commands/login/__init__.py - proot command → proot runtime: executes
- Login session → Session registry: records session
proot_distro/commands/login/__init__.py - CLI entry → Login session: selects command
- CLI entry → Build command: selects build
- Build command → Dockerfile engine: builds image
- Dockerfile engine → Build handlers: dispatches instructions
proot_distro/helpers/build_engine/engine.py - Build handlers → Build copy step: handles copy
proot_distro/helpers/build_engine/handlers.py - CLI entry → Registry push: selects push
- Registry push → OCI registry: publishes image
- CLI entry → Container lifecycle: selects management
- CLI entry → Backup archive: selects backup
- CLI entry → Restore archive: selects restore
- CLI entry → File transfer: selects sync
- Restore archive → Layer extraction: extracts archive
proot_distro/commands/restore.py - Restore archive → Filesystem safety: writes safely
proot_distro/commands/restore.py - Image cache → State and paths: uses state paths
proot_distro/helpers/docker/cache.py - State and paths → Filesystem safety: walks descriptors
proot_distro/paths.py