|
|
@ -1,7 +1,7 @@ |
|
|
|
# Build with: |
|
|
|
# docker build -t termux/package-builder . |
|
|
|
# docker build -t termux/package-builder . |
|
|
|
# Push to docker hub with: |
|
|
|
# docker push termux/package-builder |
|
|
|
# docker push termux/package-builder |
|
|
|
# This is done after changing this file or any of the |
|
|
|
# scripts/setup-{ubuntu,android-sdk}.sh setup scripts. |
|
|
|
FROM ubuntu:18.10 |
|
|
@ -14,20 +14,20 @@ COPY ./setup-ubuntu.sh ./setup-android-sdk.sh ./properties.sh /tmp/ |
|
|
|
|
|
|
|
# Setup needed packages and the Android SDK and NDK: |
|
|
|
RUN apt-get update && \ |
|
|
|
apt-get -yq upgrade && \ |
|
|
|
apt-get install -yq sudo && \ |
|
|
|
adduser --disabled-password --shell /bin/bash --gecos "" builder && \ |
|
|
|
echo "builder ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/builder && \ |
|
|
|
chmod 0440 /etc/sudoers.d/builder && \ |
|
|
|
su - builder -c /tmp/setup-ubuntu.sh && \ |
|
|
|
su - builder -c /tmp/setup-android-sdk.sh && \ |
|
|
|
# Removed unused parts to make a smaller Docker image: |
|
|
|
apt-get clean && \ |
|
|
|
rm -rf /var/lib/apt/lists/* && \ |
|
|
|
cd /home/builder/lib/android-ndk/ && \ |
|
|
|
rm -Rf sources/cxx-stl/system && \ |
|
|
|
cd /home/builder/lib/android-sdk/tools && \ |
|
|
|
rm -Rf emulator* lib* proguard templates |
|
|
|
apt-get -yq upgrade && \ |
|
|
|
apt-get install -yq sudo && \ |
|
|
|
adduser --disabled-password --shell /bin/bash --gecos "" builder && \ |
|
|
|
echo "builder ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/builder && \ |
|
|
|
chmod 0440 /etc/sudoers.d/builder && \ |
|
|
|
su - builder -c /tmp/setup-ubuntu.sh && \ |
|
|
|
su - builder -c /tmp/setup-android-sdk.sh && \ |
|
|
|
# Removed unused parts to make a smaller Docker image: |
|
|
|
apt-get clean && \ |
|
|
|
rm -rf /var/lib/apt/lists/* && \ |
|
|
|
cd /home/builder/lib/android-ndk/ && \ |
|
|
|
rm -Rf sources/cxx-stl/system && \ |
|
|
|
cd /home/builder/lib/android-sdk/tools && \ |
|
|
|
rm -Rf emulator* lib* proguard templates |
|
|
|
|
|
|
|
# We expect this to be mounted with '-v $PWD:/home/builder/termux-packages': |
|
|
|
WORKDIR /home/builder/termux-packages |
|
|
|