From bbd6013beae0ccf790e06dc3e0478921897a28f4 Mon Sep 17 00:00:00 2001 From: izzy2lost Date: Thu, 20 Mar 2025 03:38:40 -0400 Subject: [PATCH] Update Dockerfile --- Dockerfile | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index a97e692..42eb52b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:latest -# Install host system dependencies +# Install base dependencies RUN apt update && apt install -y \ proot \ git \ @@ -16,19 +16,23 @@ RUN apt update && apt install -y \ # Create Termux root directory RUN mkdir -p /termux -# Download and extract Termux rootfs -RUN wget https://termux.dev/termux-rootfs/termux-rootfs-latest.tar.xz && \ - tar -xJf termux-rootfs-latest.tar.xz -C /termux && \ - rm termux-rootfs-latest.tar.xz +# Download and extract Termux bootstrap from GitHub +RUN wget https://github.com/termux/termux-packages/releases/latest/download/bootstrap-$(uname -m).zip -O /tmp/bootstrap.zip && \ + unzip /tmp/bootstrap.zip -d /termux && \ + rm /tmp/bootstrap.zip -# Basic Termux environment setup +# Set up basic environment RUN echo "export TERMUX=/termux" >> /root/.bashrc && \ - echo "export PATH=\$PATH:/termux/bin" >> /root/.bashrc + echo "export PATH=\$PATH:/termux/usr/bin" >> /root/.bashrc && \ + echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/termux/usr/lib" >> /root/.bashrc # Install required Termux packages through proot RUN proot -b /proc -b /dev -b /sys \ -r /termux \ - /bin/bash -c " \ + /usr/bin/env -i \ + HOME=/root \ + PATH=/bin:/usr/bin:/sbin:/usr/sbin:/termux/usr/bin \ + /termux/usr/bin/bash -c " \ apt update && \ apt upgrade -y && \ apt install -y \ @@ -51,4 +55,4 @@ RUN proot -b /proc -b /dev -b /sys \ # Set working directory and entrypoint WORKDIR /workspace -ENTRYPOINT ["proot", "-b", "/proc", "-b", "/dev", "-b", "/sys", "-r", "/termux", "/bin/bash", "-l"] +ENTRYPOINT ["proot", "-b", "/proc", "-b", "/dev", "-b", "/sys", "-r", "/termux", "/termux/usr/bin/bash", "-l"]