aboutsummaryrefslogtreecommitdiff
path: root/shellcheck-builder/Dockerfile
blob: fc487154232d84558a4aee3893117c02fbd023fe (plain)
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
FROM mitchty/alpine-ghc:8.0

MAINTAINER Nikyle Nguyen <NLKNguyen@MSN.com>

RUN apk add --no-cache build-base git


RUN mkdir -p /usr/src/shellcheck
WORKDIR /usr/src/shellcheck

RUN git clone https://github.com/koalaman/shellcheck .
RUN cabal update && cabal install

ENV PATH="/root/.cabal/bin:$PATH"


# Get shellcheck binary
RUN mkdir -p /package/bin/
RUN cp $(which shellcheck) /package/bin/

# Get shared libraries
RUN mkdir -p /package/lib/
RUN ldd $(which shellcheck) | grep "=> /" | awk '{print $3}' | xargs -I '{}' cp -v '{}' /package/lib/


# Copy shellcheck package out to mounted directory
CMD ["cp", "-avr", "/package", "/mnt/"]