How to record video in headless mode running inside docker?

I have an isaac standalone example running in headless mode inside docker in server. How can i record the whole running process to a video?