Unable to write a file when running the cloc command via Docker

89 views Asked by At

I am trying to run a command, in particular the cloc tool, via docker like this

docker run --rm -v $PWD:/tmp aldanial/cloc . --vcs=git

Everything works fine and I see the results on the screen.

Now I want to write the results on a file and therefore I use the --out option like this

docker run --rm -v $PWD:/tmp aldanial/cloc . --vcs=git --csv  --out=../logs/kafka-cloc.csv 

No errors occurs but no file is written.

If I try to do the same thing running the command directly, i.e. without docker, the output file is written.

I am sure I am making a schoolboy error since I am not familiar with Docker, but I have not been able to find a solution so far.

0

There are 0 answers