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-01-15 19:43:49 +01:00
|
|
|
FROM ubuntu:16.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
|
|
|
|
|
|
|
# We expect this to be mounted with '-v $PWD:/root/termux-packages':
|
|
|
|
WORKDIR /root/termux-packages
|
|
|
|
|
|
|
|
# Needed for setup:
|
|
|
|
ADD ./setup-ubuntu.sh /tmp/setup-ubuntu.sh
|
|
|
|
ADD ./setup-android-sdk.sh /tmp/setup-android-sdk.sh
|
|
|
|
|
|
|
|
# Allow configure to be run as root:
|
|
|
|
ENV FORCE_UNSAFE_CONFIGURE 1
|
|
|
|
|
|
|
|
# Setup needed packages and the Android SDK and NDK:
|
|
|
|
RUN apt-get update && \
|
|
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -yq sudo && \
|
|
|
|
/tmp/setup-ubuntu.sh && \
|
|
|
|
apt-get clean && \
|
|
|
|
/tmp/setup-android-sdk.sh && \
|
|
|
|
# Removed unused parts to make a smaller Docker image:
|
|
|
|
cd /root/lib/android-ndk/ && \
|
|
|
|
rm -Rf toolchains/mips* && \
|
|
|
|
rm -Rf sources/cxx-stl/gabi++ sources/cxx-stl/llvm-libc++* sources/cxx-stl/system/ sources/cxx-stl/stlport && \
|
|
|
|
cd platforms && ls | grep -v android-21 | xargs rm -Rf && \
|
|
|
|
cd /root/lib/android-sdk/tools && rm -Rf emulator* lib* proguard templates
|
|
|
|
|