When is the .serverlesssrc file created?

Hi, wondering when the .serverlesssrc file is created. I want to re-create it in a Docker image and need to know how to trigger the event.