I have unit tests running on my build server and would like to capture the log results for analysis when something fails. I have yet to find a way to redirect the output of
I am not sure what you are trying to achieve. Are you trying to reproduce
docker-compose logs > logs.txt
within the compose file as an instruction? Or is your issue that the redirect does not "catch" the whole output?
In the later, you can do:
docker-compose logs --no-color >& logs.txt
Or
docker-compose logs --no-color |& tee logs.txt
to both see the logs on the terminal and dump it to a file at the same time.