mirror of
https://github.com/eclipse/upm.git
synced 2025-03-19 23:17:29 +03:00

Make a build heriarchy to reduce images size. Add Android Things builds to build matrix. Drop gcc-4 builds, use gcc-5 and gcc-6 instead. Add SonarQube static analysis scans. Signed-off-by: Nicolas Oliver <dario.n.oliver@intel.com>
42 lines
1.4 KiB
Docker
42 lines
1.4 KiB
Docker
FROM upm-base
|
|
|
|
# Update apt-get
|
|
RUN apt-get -y update && \
|
|
# Python Build Dependencies
|
|
apt-get -y --no-install-recommends install python-mraa python3-mraa \
|
|
python python-dev python3 python3-dev python-pip python3-pip \
|
|
# Java Build Dependencies
|
|
libmraa-java default-jre default-jdk
|
|
|
|
# Set JAVA_HOME
|
|
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
|
|
|
|
WORKDIR /opt
|
|
|
|
# Install Python Test Dependencies
|
|
RUN pip install chardet && pip3 install chardet
|
|
|
|
# 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 $UPM_SRC_DIR
|
|
|
|
CMD bash
|