travis: improve docker images generation for building
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>
This commit is contained in:
committed by
Brendan Le Foll
parent
3d77c86634
commit
4bedd68c4e
39
docker/Dockerfile.sonar
Normal file
39
docker/Dockerfile.sonar
Normal file
@@ -0,0 +1,39 @@
|
||||
FROM mraa-base
|
||||
|
||||
# Update apt-get
|
||||
RUN apt-get -y update && \
|
||||
# Python 2 Build Dependencies
|
||||
apt-get -y --no-install-recommends install python python-dev \
|
||||
# Python 3 Build Dependencies
|
||||
python3 python3-dev \
|
||||
# Java Build Dependencies
|
||||
default-jre default-jdk
|
||||
|
||||
# Set JAVA_HOME
|
||||
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
|
||||
|
||||
WORKDIR /opt
|
||||
|
||||
# Node.js Build Dependencies
|
||||
RUN wget -q -O - https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
|
||||
ENV NVM_DIR /root/.nvm
|
||||
ARG NODE_VERSION
|
||||
RUN . $NVM_DIR/nvm.sh && nvm install $NODE_VERSION && nvm use $NODE_VERSION && \
|
||||
npm install -g node-gyp && node-gyp install
|
||||
ENV PATH $NVM_DIR/versions/node/$NODE_VERSION/bin:$PATH
|
||||
|
||||
# Static Code Analysis Scanner
|
||||
ENV SONAR_DIR /opt/sonar
|
||||
ENV SONAR_VER "3.0.3.778"
|
||||
WORKDIR $SONAR_DIR
|
||||
RUN wget https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SONAR_VER}-linux.zip && \
|
||||
wget https://sonarqube.com/static/cpp/build-wrapper-linux-x86.zip && \
|
||||
unzip sonar-scanner-cli-${SONAR_VER}-linux.zip && \
|
||||
unzip build-wrapper-linux-x86.zip && \
|
||||
rm sonar-scanner-cli-${SONAR_VER}-linux.zip build-wrapper-linux-x86.zip
|
||||
ENV PATH $SONAR_DIR/sonar-scanner-${SONAR_VER}-linux/bin:$SONAR_DIR/build-wrapper-linux-x86:$PATH
|
||||
|
||||
# Set Workdir
|
||||
WORKDIR $MRAA_SRC_DIR
|
||||
|
||||
CMD bash
|
||||
Reference in New Issue
Block a user