diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index f44dbf7..1dce36d 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -18,6 +18,7 @@ jobs: matrix: CPU_ARCH: - aarch64 + - arm - i686 - x86_64 steps: diff --git a/Dockerfile b/Dockerfile index 0315e67..0ec754d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -50,24 +50,25 @@ RUN busybox chown -Rh 0:0 /system && \ cd /data/data/com.termux/files/usr && \ busybox find ./bin ./lib/apt ./lib/bash ./libexec -type f -exec busybox chmod 700 "{}" \; -# Use utilities from Termux and switch user to non-root. -ENV PATH /data/data/com.termux/files/usr/bin -SHELL ["/data/data/com.termux/files/usr/bin/sh", "-c"] +# Switch user to non-root. USER 1000:1000 # Update static DNS cache on login. Also symlink script and host list to prefix. RUN echo "echo -e 'Updating static DNS:\n' && /system/bin/update-static-dns && echo" \ > /data/data/com.termux/files/home/.bashrc && \ - ln -s /system/bin/update-static-dns /data/data/com.termux/files/usr/bin/update-static-dns && \ - ln -s /system/etc/static-dns-hosts.txt /data/data/com.termux/files/usr/etc/static-dns-hosts.txt + busybox ln -s /system/bin/update-static-dns /data/data/com.termux/files/usr/bin/update-static-dns && \ + busybox ln -s /system/etc/static-dns-hosts.txt /data/data/com.termux/files/usr/etc/static-dns-hosts.txt -# Update static DNS cache, install updates and cleanup. -RUN /system/bin/update-static-dns && \ +# Update static DNS cache, install updates and cleanup when not building for arm. +ENV PATH /data/data/com.termux/files/usr/bin +RUN if [ ${BOOTSTRAP_ARCH} == 'arm' ]; then exit; else \ + update-static-dns && \ apt update && \ apt upgrade -o Dpkg::Options::=--force-confnew -yq && \ rm -rf /data/data/com.termux/files/usr/var/lib/apt/* && \ rm -rf /data/data/com.termux/files/usr/var/log/apt/* && \ - rm -rf /data/data/com.termux/cache/apt/* + rm -rf /data/data/com.termux/cache/apt/* ;\ + fi ############################################################################## # Create final image. diff --git a/README.md b/README.md index 45346a2..a9a3d38 100644 --- a/README.md +++ b/README.md @@ -40,8 +40,7 @@ Running image: 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. Whereas Docker Hub contains prebuilt ARM image, it - is outdated and won't receive updates anymore. + `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` and