forked from alaegin/Detekt-Action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
26 lines (18 loc) · 1016 Bytes
/
Dockerfile
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
FROM alpine:3.13.1
# https://github.com/detekt/detekt/releases
ARG DETEKT_VERSION="1.23.5"
# https://github.com/reviewdog/reviewdog/releases
ARG REVIEWDOG_VERSION="0.14.2"
ARG DETEKT_FILE_NAME="detekt-cli-${DETEKT_VERSION}-all.jar"
ARG DETEKT_URL="https://github.com/detekt/detekt/releases/download/v${DETEKT_VERSION}/${DETEKT_FILE_NAME}"
ARG DETEKT_FORMATTING_FILE_NAME="detekt-formatting-${DETEKT_VERSION}.jar"
ARG DETEKT_FORMATTING_URL="https://github.com/detekt/detekt/releases/download/v${DETEKT_VERSION}/${DETEKT_FORMATTING_FILE_NAME}"
RUN apk --no-cache --update add git curl openjdk11 bash \
&& rm -rf /var/cache/apk/*
RUN wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/v${REVIEWDOG_VERSION}/install.sh | sh -s -- -b /usr/local/bin/
RUN curl -sSLO $DETEKT_URL \
&& mv $DETEKT_FILE_NAME /opt/detekt.jar
RUN curl -sSLO $DETEKT_FORMATTING_URL \
&& mv $DETEKT_FORMATTING_FILE_NAME /opt/detekt-formatting.jar
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]