-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
61 lines (49 loc) · 1.9 KB
/
Dockerfile
File metadata and controls
61 lines (49 loc) · 1.9 KB
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
58
59
60
61
FROM golang:1.26-alpine3.23 AS go-build
WORKDIR /go/src/
# hadolint ignore=DL3018
RUN apk --no-cache add git upx \
&& go install 'gitlab.com/pipeline-components/org/gitlab-reportinator/cmd/gitlab-reportinator@v0.6.0' \
&& upx -9 /go/bin/gitlab-reportinator
FROM alpine:3.23.4 AS build
# hadolint ignore=DL3018
RUN apk --no-cache add \
curl \
cabal \
ghc \
build-base \
libffi-dev \
upx
COPY app /app/
RUN mkdir -p /app/shellcheck
WORKDIR /app/shellcheck
RUN \
cabal update && \
cabal install --jobs --enable-executable-stripping --enable-optimization=2 --enable-shared --enable-split-sections --disable-debug-info ShellCheck-0.10.0
RUN cp "$(readlink -f /root/.local/bin/shellcheck)" /root/.local/bin/shellcheck && \
upx -9 /root/.local/bin/shellcheck
FROM pipelinecomponents/base-entrypoint:0.5.0 AS entrypoint
FROM alpine:3.23.4
COPY --from=entrypoint /entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
ENV DEFAULTCMD=shellcheck
COPY app /app/
# hadolint ignore=DL3018
RUN apk --no-cache add libffi libgmpxx parallel bash
COPY --from=build /root/.local/bin/shellcheck /usr/local/bin/shellcheck
COPY --from=go-build /go/bin/gitlab-reportinator /usr/local/bin/convert_report
WORKDIR /code/
# Build arguments
ARG BUILD_DATE
ARG BUILD_REF
# Labels
LABEL \
maintainer="Robbert Müller <dev@pipeline-components.dev>" \
org.label-schema.description="Shellcheck in a container for gitlab-ci" \
org.label-schema.build-date=${BUILD_DATE} \
org.label-schema.name="Shellcheck" \
org.label-schema.schema-version="1.0" \
org.label-schema.url="https://pipeline-components.gitlab.io/" \
org.label-schema.usage="https://gitlab.com/pipeline-components/shellcheck/blob/main/README.md" \
org.label-schema.vcs-ref=${BUILD_REF} \
org.label-schema.vcs-url="https://gitlab.com/pipeline-components/shellcheck/" \
org.label-schema.vendor="Pipeline Components"