I have a docker instance of node-red and I want to save node-red console logs into a separate log file inside the docker container. Is there any method to do it?
The Node-RED process only logs to console at the moment, but you can redirect the output to a file using normal unix redirects e.g.
node-red > /path/to/log/file
The Node-RED service on Raspbian uses systemd to redirect the output to syslog with the identifier "Node-RED" so this could also be directed to a separate file.
The standard Node-RED docker containers just start Node-RED as the CMD. You can configure how docker logs that content using the details in the docker docs here: https://docs.docker.com/engine/admin/logging/overview/#configure-the-logging-driver-for-a-container.
If you want to modify the CMD to redirect the outut to somewhere inside the container then this SO question and answer will probably be useful: Redirecting command output in docker