mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-08 10:12:50 +08:00
19 lines
622 B
Docker
19 lines
622 B
Docker
# This file builds ShellCheck for pre-commit.
|
|
#
|
|
# It may also be useful for local development, but it is notably NOT
|
|
# used to build the official ShellCheck docker images.
|
|
|
|
FROM ubuntu:20.04
|
|
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y cabal-install
|
|
RUN cabal update
|
|
|
|
# Install dependencies separately for more efficient iteration
|
|
COPY ShellCheck.cabal /build/
|
|
RUN cd /build && cabal install --dependencies-only
|
|
|
|
# Now build the rest
|
|
COPY . /build/
|
|
RUN cd /build && cabal build shellcheck
|
|
RUN find /build -type f -name shellcheck -perm /111 -exec cp -f {} /bin \;
|
|
ENTRYPOINT ["/bin/shellcheck"]
|