mirror of
https://github.com/termux/termux-docker.git
synced 2025-12-22 08:30:01 +00:00
CI: Build image for arm
This commit is contained in:
committed by
Henrik Grimler
parent
d3a17457fd
commit
36743e506b
1
.github/workflows/docker_build.yml
vendored
1
.github/workflows/docker_build.yml
vendored
@@ -18,6 +18,7 @@ jobs:
|
||||
matrix:
|
||||
CPU_ARCH:
|
||||
- aarch64
|
||||
- arm
|
||||
- i686
|
||||
- x86_64
|
||||
steps:
|
||||
|
||||
17
Dockerfile
17
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.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user