docker run --name test1 -it --entrypoint /bin/sh --privileged <image-name>
echo "/cores/core" | tee /proc/sys/kernel/core_pattern
mkdir /cores
ulimit -c unlimited
<run command to caush crash>
exit
# Copies core dump file from the container to your local dir
docker cp test1:/cores/core core
docker rm test1