Improved Dockerfile
This commit is contained in:
parent
b3f7d8facd
commit
d57e2a5546
19
Dockerfile
19
Dockerfile
@ -1,13 +1,18 @@
|
|||||||
FROM openjdk:8-jre-alpine
|
FROM openjdk:8-jre-alpine
|
||||||
RUN apk add --no-cache --update nodejs
|
|
||||||
|
ARG SONAR_VERSION=3.3.0.1492
|
||||||
|
ARG SONAR_SCANNER_CLI=sonar-scanner-cli-${SONAR_VERSION}
|
||||||
|
ARG SONAR_SCANNER=sonar-scanner-${SONAR_VERSION}
|
||||||
|
|
||||||
|
RUN apk add --no-cache --update nodejs curl
|
||||||
COPY drone-sonar /bin/
|
COPY drone-sonar /bin/
|
||||||
COPY lib/sonar-scanner-cli-3.3.0.1492.zip /bin
|
|
||||||
|
|
||||||
WORKDIR /bin
|
WORKDIR /bin
|
||||||
RUN unzip sonar-scanner-cli-3.3.0.1492.zip \
|
|
||||||
&& mv sonar-scanner-3.3.0.1492 sonar-scanner \
|
|
||||||
&& rm -rf sonar-scanner-cli-3.3.0.1492.zip
|
|
||||||
|
|
||||||
ENV PATH $PATH:/bin/sonar-scanner/bin
|
RUN curl https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/${SONAR_SCANNER_CLI}.zip -so /bin/${SONAR_SCANNER_CLI}.zip
|
||||||
|
RUN unzip ${SONAR_SCANNER_CLI}.zip \
|
||||||
|
&& rm ${SONAR_SCANNER_CLI}.zip \
|
||||||
|
&& apk del curl
|
||||||
|
|
||||||
|
ENV PATH $PATH:/bin/${SONAR_SCANNER}/bin
|
||||||
|
|
||||||
ENTRYPOINT /bin/drone-sonar
|
ENTRYPOINT /bin/drone-sonar
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user