I want to redirect all the logs of my docker container to single log file to analyse them. I tried
docker logs container > /tmp/stdout.log 2>/tmp/stderr.log
but this gives log in two different file. I already tried
docker logs container > /tmp/stdout.log
but it did not work.
How about this option:
docker logs containername >& logs/myFile.log
It will not redirect logs which was asked for in the question, but copy them once to a specific file.