-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
57 lines (53 loc) · 1.89 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
FROM curlimages/curl as stage-0
USER root
RUN \
apk add --no-cache bash nodejs && \
curl -sSfLo /usr/bin/jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 && chmod +x /usr/bin/jq
RUN ln -s /usr/local/lib/ghlint/main.sh /usr/local/bin/ghlint
FROM stage-0 as stage-1
USER curl_user
WORKDIR /home/curl_user
RUN mkdir -p .ghlint
VOLUME [ "/home/curl_user/.ghlint" ]
FROM stage-1 as stage-deply
COPY src /usr/local/lib/ghlint
FROM stage-deply as stage-prd
ARG CREATED
ARG VERSION
ARG REVISION
LABEL \
org.opencontainers.image.created=${CREATED} \
org.opencontainers.image.authors= \
org.opencontainers.image.url= \
org.opencontainers.image.documentation= \
org.opencontainers.image.source=https://github.com/kyash/ghlint \
org.opencontainers.image.version=${VERSION} \
org.opencontainers.image.revision=${REVISION} \
org.opencontainers.image.vendor="Kyash Inc." \
org.opencontainers.image.licenses= \
org.opencontainers.image.title="ghlint" \
org.opencontainers.image.description="Find problems in your GitHub settings." \
Maintainer= \
Name= \
Version= \
docker.cmd=
ENTRYPOINT [ "ghlint" ]
FROM stage-1 as stage-dev
USER root
RUN \
apk add --no-cache openssh git vim nodejs-npm ncurses && \
ln -fs /usr/lib/libcurl.so.4.7.0 /usr/lib/libcurl.so.4 && \
ln -fs /usr/lib/libcurl.so.4 /usr/lib/libcurl.so && \
curl -sSfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b /usr/local/bin && \
( \
set -o pipefail && \
tmpdir="$(mktemp -d)" && \
cd "$tmpdir" && \
scversion="stable" && \
curl -sSfL "https://github.com/koalaman/shellcheck/releases/download/${scversion?}/shellcheck-${scversion?}.linux.x86_64.tar.xz" | \
tar -xJ "shellcheck-${scversion?}/shellcheck" && \
mv "shellcheck-${scversion}/shellcheck" /usr/local/bin/ && \
shellcheck --version && \
cd && rm -Rf "$tmpdir" \
) && \
npm i -g bats