Lars The cf32710a93 Add support for user static DNS file (#45)
Adds the file `/data/data/com.termux/files/home/.static-dns-hosts.txt` with empty content to bind to it externally with some user hosts. The script `update-static-dns` then uses the regular system wide static-dns-hosts.txt and the content of this file. The user can edit it inside the container, and/or bind it with an external file.
2022-11-30 21:25:24 +08:00
2022-11-26 23:07:13 +08:00
2022-05-04 15:01:24 +02:00
2020-02-08 18:13:00 +02:00

Termux environment for Docker/Podman.

A Termux environment packaged into Docker image. Environment doesn't have Android runtime components, so certain things will not be available (DalvikVM, OpenSLES, etc...).

How to use

  1. Make sure that Docker is installed and running.
  2. git clone https://github.com/termux/termux-docker && cd ./termux-docker
  3. ./run.sh or ./run-x86_64.sh - if need x86_64 arch.

You can use the image directly without startup script. For example:

docker run -it termux/termux-docker:latest

You can build Docker image yourself by running this script:

./build-all.sh

Using with Podman

If you have Podman instead of Docker, usage is nearly same.

Building image:

./build-all.sh --podman

Running image:

./run.sh --podman
./run-x86_64.sh --podman

Known issues

There a number of known issues which may not be resolved:

  • ARM containers may require a custom seccomp profile to remove restrictions from personality() system call.

  • DNS: Docker image has to use a static DNS resolver through /system/etc/hosts. You can regenerate this file by editing /system/etc/static-dns-hosts.txt or /data/data/com.termux/files/home/.termux/termux-docker/static-dns-hosts.txt (aka ~/.termux/termux-docker/static-dns-hosts.txt) (this is preferable for docker binds) and executing script /system/bin/update-static-dns.

  • When running certain multi threaded program in 32bit containers, the PIDs can balloon and easily exceed libc's limit. The only way to fix this is to set /proc/sys/kernel/pid_max to 65536. See termux-docker#40.

Description
Termux environment with pacman bootstrap packaged as Docker image.
Readme 25 MiB
Languages
Dockerfile 64.9%
Shell 35.1%