forked from AlDanial/cloc
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (26 loc) · 764 Bytes
/
Dockerfile
File metadata and controls
35 lines (26 loc) · 764 Bytes
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
# Dockerfile by Sébastien HOUZÉ, https://github.com/shouze
FROM perl:slim
RUN apt-get update && apt-get install -y \
unzip \
git \
&& rm -rf /var/lib/apt/lists/*
#Install all dependencies
RUN perl -MCPAN -e 'install Algorithm::Diff'
RUN perl -MCPAN -e 'install Regexp::Common'
RUN perl -MCPAN -e 'install Digest::MD5'
RUN perl -MCPAN -e 'install Parallel::ForkManager'
#Copy source code
COPY cloc /usr/src/
COPY .git /usr/src/.git
COPY tests /usr/src/tests
COPY Unix /usr/src/Unix
WORKDIR /usr/src/Unix
#Checkout of cloc_submodule_test for t/02_git.t tests
RUN git clone https://github.com/AlDanial/cloc_submodule_test.git
#Run tests
RUN make test
#Cleanup of git folder
RUN rm -rf .git
WORKDIR /tmp
ENTRYPOINT ["/usr/src/cloc"]
CMD ["--help"]