2016-10-07 19:36:58 +02:00
|
|
|
# Build with:
|
|
|
|
# docker build -t termux/package-builder .
|
|
|
|
# Push to docker hub with:
|
2016-10-07 19:56:46 +02:00
|
|
|
# docker push termux/package-builder
|
2016-10-07 19:36:58 +02:00
|
|
|
# This is done after changing this file or any of the
|
|
|
|
# scripts/setup-{ubuntu,android-sdk}.sh setup scripts.
|
2017-11-02 10:18:05 +01:00
|
|
|
FROM ubuntu:17.10
|
2016-05-28 00:24:50 +02:00
|
|
|
|
|
|
|
# Fix locale to avoid warnings:
|
2017-01-15 19:43:49 +01:00
|
|
|
ENV LANG C.UTF-8
|
2016-05-28 00:24:50 +02:00
|
|
|
|
|
|
|
# Needed for setup:
|
2017-02-02 01:35:53 +01:00
|
|
|
COPY ./setup-ubuntu.sh /tmp/setup-ubuntu.sh
|
|
|
|
COPY ./setup-android-sdk.sh /tmp/setup-android-sdk.sh
|
2016-05-28 00:24:50 +02:00
|
|
|
|
|
|
|
# Setup needed packages and the Android SDK and NDK:
|
|
|
|
RUN apt-get update && \
|
2017-01-22 23:13:48 +01:00
|
|
|
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 && \
|
2016-05-28 00:24:50 +02:00
|
|
|
# Removed unused parts to make a smaller Docker image:
|
2017-01-22 23:13:48 +01:00
|
|
|
apt-get clean && \
|
|
|
|
rm -rf /var/lib/apt/lists/* && \
|
|
|
|
cd /home/builder/lib/android-ndk/ && \
|
2016-05-28 00:24:50 +02:00
|
|
|
rm -Rf toolchains/mips* && \
|
2017-07-15 02:25:12 +02:00
|
|
|
rm -Rf sources/cxx-stl/gabi++ sources/cxx-stl/system/ sources/cxx-stl/stlport && \
|
2017-01-22 23:13:48 +01:00
|
|
|
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
|
2016-05-28 00:24:50 +02:00
|
|
|
|