-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (20 loc) · 956 Bytes
/
Copy pathDockerfile
File metadata and controls
27 lines (20 loc) · 956 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FROM python:3.8 as dev
LABEL Author="Keshav Murthy"
ENV SONAR_SCANNER_VERSION 4.6.0.2311
RUN python3 -m pip install --upgrade pip setuptools wheel
RUN python3 -m pip install --user --upgrade twine
RUN mkdir -p /app
WORKDIR /app
COPY requirements* /app/
COPY pypirc /root/.pypirc
RUN python3 -m pip install -r /app/requirements_dev.txt
ADD . /app
ENV PATH="/root/.local/bin:${PATH}"
FROM dev AS sonar
RUN apt update
RUN apt purge --auto-remove openjdk*
RUN apt install -y default-jdk wget bsdtar
RUN wget -qO- https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SONAR_SCANNER_VERSION}-linux.zip | bsdtar -xvf - -C /root/.local/
RUN chmod +x /root/.local/sonar-scanner-${SONAR_SCANNER_VERSION}-linux/bin/sonar-scanner
RUN chmod +x /root/.local/sonar-scanner-${SONAR_SCANNER_VERSION}-linux/jre/bin/java
RUN ln -s /root/.local/sonar-scanner-${SONAR_SCANNER_VERSION}-linux/bin/sonar-scanner /root/.local/bin/sonar-scanner