When I run cloc inside a docker container, it does not seem to recursively search through the given directories, compared to running it stand-alone.
Dockerfile:
FROM python:3.6.2-alpine3.6
VOLUME "/data"
WORKDIR /data
RUN apk --no-cache add cloc=1.72-r2
Running cloc without the docker container I get the following:
cloc src\main\java\ --by-file --unix --report-file=temp.csv
19 text files.
19 unique files.
12 files ignored.
Wrote temp.csv
When running it with the docker container the following happens:
docker run --rm -it -v C:\repos\code-repository\:/data cloc-image cloc src/main/java --by-file --unix --report-file=/data/temp2.csv
0 text files.
0 unique files.
2 files ignored.
Any ideas? I have:
- Checked the rights of the user in the docker container (root).
- Using
ash
I checked inside the container if the volume was correctly mapped, and all files were present. - Checked if the version of cloc inside the container was indeed the same as the local installation (both 1.72).
EDIT 1:
Interesting finding, this behaviour only shows on Windows, the same Dockerfile/container works fine on a linux machine.