Make a build heriarchy to reduce images size. Add Android Thing Build. Signed-off-by: Nicolas Oliver <dario.n.oliver@intel.com> Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
30 lines
993 B
Docker
30 lines
993 B
Docker
FROM mraa-java
|
|
|
|
WORKDIR /opt
|
|
|
|
# Install CMake 3.6.2
|
|
RUN wget -q https://cmake.org/files/v3.6/cmake-3.6.2-Linux-x86_64.sh && \
|
|
mkdir /opt/cmake && \
|
|
sh /opt/cmake-3.6.2-Linux-x86_64.sh --prefix=/opt/cmake --skip-license && \
|
|
ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake && \
|
|
cmake --version && \
|
|
rm -fr /opt/cmake-3.6.2-Linux-x86_64.sh
|
|
|
|
# Android NDK build Dependencies
|
|
RUN wget -q https://dl.google.com/android/repository/android-ndk-r14b-linux-x86_64.zip && \
|
|
unzip -qq android-ndk-r14b-linux-x86_64.zip && \
|
|
rm -fr android-ndk-r14b-linux-x86_64.zip
|
|
ENV NDK_HOME /opt/android-ndk-r14b
|
|
ENV NDK_MODULE_PATH /opt/android-ndk-r14b
|
|
|
|
# Android Things library
|
|
RUN wget -q https://github.com/androidthings/native-libandroidthings/archive/0.4.1-devpreview.tar.gz && \
|
|
tar xf 0.4.1-devpreview.tar.gz && \
|
|
rm -fr /opt/0.4.1-devpreview.tar.gz
|
|
ENV ANDROIDTHINGS_NATIVE_LIB /opt/native-libandroidthings-0.4.1-devpreview
|
|
|
|
# Set Workdir
|
|
WORKDIR $MRAA_SRC_DIR
|
|
|
|
CMD bash
|