mirror of
https://github.com/izzy2lost/termux-docker.git
synced 2026-07-05 15:18:43 -07:00
Update Dockerfile
This commit is contained in:
+13
-9
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user