chiark / gitweb /
Minor comment cleanups of Dockerfile
[termux-packages] / scripts / Dockerfile
CommitLineData
5b7c3ff6
FF
1# Build with:
2# docker build -t termux/package-builder .
3# Push to docker hub with:
4# docker push termux/package-builder'
5# This is done after changing this file or any of the
6# scripts/setup-{ubuntu,android-sdk}.sh setup scripts.
88183689
FF
7FROM ubuntu:16.04
8
9# Fix locale to avoid warnings:
10RUN locale-gen en_US.UTF-8
11RUN dpkg-reconfigure locales
12
13# We expect this to be mounted with '-v $PWD:/root/termux-packages':
14WORKDIR /root/termux-packages
15
16# Needed for setup:
17ADD ./setup-ubuntu.sh /tmp/setup-ubuntu.sh
18ADD ./setup-android-sdk.sh /tmp/setup-android-sdk.sh
19
20# Allow configure to be run as root:
21ENV FORCE_UNSAFE_CONFIGURE 1
22
23# Setup needed packages and the Android SDK and NDK:
24RUN apt-get update && \
25 DEBIAN_FRONTEND=noninteractive apt-get install -yq sudo && \
26 /tmp/setup-ubuntu.sh && \
27 apt-get clean && \
28 /tmp/setup-android-sdk.sh && \
29 # Removed unused parts to make a smaller Docker image:
30 cd /root/lib/android-ndk/ && \
31 rm -Rf toolchains/mips* && \
32 rm -Rf sources/cxx-stl/gabi++ sources/cxx-stl/llvm-libc++* sources/cxx-stl/system/ sources/cxx-stl/stlport && \
33 cd platforms && ls | grep -v android-21 | xargs rm -Rf && \
34 cd /root/lib/android-sdk/tools && rm -Rf emulator* lib* proguard templates
35