forked from mrfyda/codacy-shellcheck
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
32 lines (25 loc) · 946 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
27
28
29
30
31
32
FROM alpine:3.17.3 as base
ARG SHELLCHECK_VERSION=0.9.0
RUN apk add --no-cache bash
RUN export EXTRACTED_DIR_NAME=shellcheck-v$SHELLCHECK_VERSION && \
export ARCHIVE_NAME=$EXTRACTED_DIR_NAME.linux.x86_64.tar.xz && \
wget https://github.com/koalaman/shellcheck/releases/download/v$SHELLCHECK_VERSION/$ARCHIVE_NAME && \
tar -xf $ARCHIVE_NAME && \
mv $EXTRACTED_DIR_NAME/shellcheck /usr/bin && \
rm -rf $EXTRACTED_DIR_NAME $ARCHIVE_NAME
FROM base as dev
RUN apk add --no-cache openjdk11
COPY docs /docs
RUN adduser --uid 2004 --disabled-password --gecos "" docker
COPY target/universal/stage/ /workdir/
RUN chmod +x /workdir/bin/codacy-shellcheck
USER docker
WORKDIR /workdir
ENTRYPOINT ["bin/codacy-shellcheck"]
FROM base
COPY docs /docs
RUN adduser --uid 2004 --disabled-password --gecos "" docker
COPY target/graalvm-native-image/codacy-shellcheck /workdir/
USER docker
WORKDIR /workdir
ENTRYPOINT ["/workdir/codacy-shellcheck"]