I need to run the docker container with logs redirected to a file in a shared location. I searched a lot for but didn't a solution for this. what I tried is: Run the docker container first docker run --name sample -d -p 8083:8080 xxxxx.yyyy.zzz/test/test-application:latest
then I ran docker run -v /home/ubuntu/logs:/opt/logs sample but when i check /home/ubuntu/logs folder, nothing is there.
Can anyone help me on this?
Thanks in advance,