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 docker-compose logs
to a file, or to find where the log files themselves actually live.
I want the equivalent of:
docker-compose logs > logs.txt
Edit - clarification:
All of my docker containers produce useful logs, which a manual run of docker-compose logs
reveals. I want to script this process to save those same logs to a file that is an artifact on my build server. Essentially, the output of docker-compose logs
saved to a file, however docker-compose logs
never exits.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…