Core dump in container

Is there a way to configure the container to generate cores in the dedicated volume/host mount ?
or should I write a script that scans periodically the working dir and move the cores when it finds it

Thanks