argos/dmp-frontend/Dockerfile.Sonar

31 lines
882 B
Docker
Raw Normal View History

FROM node:20
ARG ORACLE_URL
ARG ORACLE_TOKEN
ARG BUILD_VERSION
ENV ORACLE_URL=$ORACLE_URL
ENV ORACLE_TOKEN=$ORACLE_TOKEN
ENV BUILD_VERSION=$BUILD_VERSION
2024-04-23 14:13:18 +02:00
RUN npm list -g --depth=0
RUN apt-get -y update && apt-get install -y openjdk-17-jre locales && apt-get clean
RUN mkdir -p /usr/share/man/man1/
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
locale-gen
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
2024-04-23 15:41:37 +02:00
COPY oracle.local.cite.gr.crt /usr/local/share/ca-certificates/oracle.local.cite.gr.crt
RUN update-ca-certificates
# copy the package.json to install dependencies
2024-04-23 13:53:18 +02:00
COPY package.json ./
# Install the dependencies and make the folder
2024-04-23 15:31:31 +02:00
RUN npm install --legacy-peer-deps sonar-scanner --save-dev
RUN npm install --legacy-peer-deps && mkdir /src && mv ./node_modules ./src
WORKDIR /src
COPY . .
RUN npm run sonar-scanner