0

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.

Picci
  • 16,775
  • 13
  • 70
  • 113
  • 2
    The file will be written to the container filesystem. If you use `--out=/tmp/whatever` it will be written to your mounted volume – Phil May 22 '23 at 06:48

0 Answers0