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