Created
July 2, 2020 12:26
-
-
Save btshft/ef92813466f01ab5e4ca0e16a0c440d3 to your computer and use it in GitHub Desktop.
Scan typescript app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:lts-buster | |
# Install OpenJDK-11 | |
RUN apt-get update && \ | |
apt-get install -y openjdk-11-jdk && \ | |
apt-get install -y ant && \ | |
apt-get clean; | |
# Fix certificate issues | |
RUN apt-get update && \ | |
apt-get install ca-certificates-java && \ | |
apt-get clean && \ | |
update-ca-certificates -f; | |
# Setup JAVA_HOME -- useful for docker commandline | |
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64/ | |
RUN export JAVA_HOME | |
# Install Google Chrome | |
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - | |
RUN sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' | |
RUN apt-get update && apt-get install -y google-chrome-stable | |
WORKDIR /usr/src/app | |
COPY package.json package-lock.json ./ | |
RUN npm install sonar-scanner --save-dev | |
RUN npm install | |
COPY . . | |
RUN npm test -- --codeCoverage=true --watch=false | |
RUN npm run sonar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment