Skip to content

A rootless Android app that boots Alpine Linux: run containers (Podman/Docker/LXC) and GUI desktop apps.

826 B
Raw Blame
#!/bin/sh
# Serves the offline copy of the Podroid documentation (docs/guide/, mirrored
# into the squashfs at build time by build-rootfs.sh) over plain HTTP, so it
# can be read from a browser with no network connection.
#
# Runs in the foreground until interrupted (Ctrl-C); forward the port to read
# it from the phone's own browser:
#   podroid-forward add 9980 9980 tcp
# then open http://127.0.0.1:9980

DOCROOT=/usr/share/doc/podroid

if [ ! -d "$DOCROOT" ]; then
    echo "podroid-docs: $DOCROOT not found" >&2
    exit 1
fi

echo "Serving the Podroid docs at http://127.0.0.1:9980 (Ctrl-C to stop)"
echo "From the phone: podroid-forward add 9980 9980 tcp, then open http://127.0.0.1:9980"

# Alpine ships httpd in busybox-extras, not in the base busybox applet set.
exec busybox-extras httpd -f -p 9980 -h "$DOCROOT"