Skip to content

Run Docker images in Termux via Udocker. No root, no qemu-VM, much faster.

Notifications You must be signed in to change notification settings

George-Seven/Termux-Udocker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

Correctly configures Udocker so that it works properly in Termux.

What's Udocker?

It's a userspace implementation of Docker.

It means that it can, without root or custom-kernel, run Docker images and containers.

And it does this without spinning up an entire qemu-VM, which makes it much, much faster than any other alternatives.

https://f-droid.org/en/packages/com.termux/

https://github.com/indigo-dc/udocker


Instructions

In Termux -

git clone --depth 1 https://github.com/George-Seven/Termux-Udocker ~/Termux-Udocker
bash ~/Termux-Udocker/install_udocker.sh

And done.

Help text

udocker --help

Keep it updated

cd ~/Termux-Udocker; git pull

Examples

Here are example scripts provided for some popular Docker images -

Name: Stirling PDF (frooodle/s-pdf:latest)

~/Termux-Udocker/s-pdf.sh

Connect to it at - http://localhost:8080


Name: Nextcloud (nextcloud:latest)

~/Termux-Udocker/nextcloud.sh

Connect to it at - http://localhost:2080


Name: ownCloud (owncloud/server:latest)

~/Termux-Udocker/owncloud.sh

Connect to it at - http://localhost:2081


Name: HTTPD (httpd:latest)

~/Termux-Udocker/httpd.sh

Connect to it at - http://localhost:2082


Name: Redis (redis:latest)

~/Termux-Udocker/redis.sh

Connect to it at - http://localhost:6379


Customize

Change Port

PORT=9080 ~/Termux-Udocker/s-pdf.sh

Add PORT=number before the script. Port must be from 1024~65535.


Run custom commands

~/Termux-Udocker/s-pdf.sh 'echo hello world; echo hi'

To override the default startup commands with your own, add your commands after the script like so.