I'm quite new to Docker, so maybe the answer to my question is obvious for you, sorry for that. I have a Docker container and I would like to save logs from it to the file so that they will be available even after removing the container.
I know I can access the logs of the container when it's running, but in case of removing the container, I would like to have a backup.
Probably I can redirect the logs to the file manually, but I would like to do that automatically in the real-time.
Is there any way to do that? I was looking for the answer but haven't found anything, although the problem sounds quite simple so I guess there is some solution to it.