bc-dev-android-r17c 1.99 KB
Newer Older
1 2 3 4 5 6 7
FROM debian:stretch

MAINTAINER Ghislain MARY <ghislain.mary@belledonne-communications.com>

#RUN localedef -i en_US -f UTF-8 en_US.UTF-8

# Define environment
Ghislain MARY's avatar
Ghislain MARY committed
8
ENV ANDROID_NDK r17c
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
ENV ANDROID_SDK 25.2.5
ENV ANDROID_HOME /opt/android-sdk-linux
#ENV LANG en_US.UTF-8
#ENV LC_ALL en_US.UTF-8
ENV SHELL=/bin/bash

# Install common general tools
RUN apt-get update && \
    apt-get install -y curl nano sudo unzip vim wget && \
    apt-get clean

# Install development tools
RUN apt-get update && \
    apt-get install -y ccache doxygen git make nasm ninja-build openjdk-8-jdk-headless pkg-config python-pystache python-six yasm && \
    apt-get clean

# Install CMake (version from the debian repository is too old)
ENV CMAKE3_HOME /opt/cmake3
RUN mkdir $CMAKE3_HOME && \
    curl --fail --silent --show-error \
         --location https://cmake.org/files/v3.10/cmake-3.10.0-Linux-x86_64.tar.gz | \
    tar --extract --gzip --no-same-owner --file - --strip-components=1 --directory $CMAKE3_HOME

# Get the Android tools
RUN wget https://dl.google.com/android/repository/tools_r$ANDROID_SDK-linux.zip && \
    unzip tools_r$ANDROID_SDK-linux.zip -d $ANDROID_HOME && \
    rm -f tools_r$ANDROID_SDK-linux.zip
ENV PATH $ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools:$PATH

# Get the Android SDK
RUN echo "y" | sdkmanager "platforms;android-28" "build-tools;28.0.0" "extras;android;m2repository" "extras;google;m2repository" "platform-tools" "tools"

# Get the Android NDK
RUN wget http://dl.google.com/android/repository/android-ndk-$ANDROID_NDK-linux-x86_64.zip && \
    unzip android-ndk-$ANDROID_NDK-linux-x86_64.zip -d /opt && \
    rm -f android-ndk-$ANDROID_NDK-linux-x86_64.zip
ENV ANDROID_NDK_HOME /opt/android-ndk-$ANDROID_NDK
ENV PATH $ANDROID_NDK_HOME:$CMAKE3_HOME/bin/:$PATH

# Configure user bc
RUN useradd -ms /bin/bash bc && \
    echo 'bc:cotcot' | chpasswd && \
    echo 'bc ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

USER bc
WORKDIR /home/bc
Ghislain MARY's avatar
Ghislain MARY committed
55
ENV PS1='\[\e[34m\]\u@bc-dev-android-r17c>\[\e[0m\] '
56
CMD bash