Gdb inside container gets terminated with 137
Exit code 137 means that the process was killed by signal 9 (137=128+9). Most likely reason is that container was running out of memory and gdb was killed by OOM Killer. Check dmesg
output for any messages from OOM Killer.