[IMP] runbot: avoid core dumps in containers

In some conditions, the google-chrome crashes and a core dump is written
in the bind mounted directory.

With this commit, the core dumps are disabled in the containers.
This commit is contained in:
Christophe Monniez 2022-02-07 14:18:26 +01:00 committed by xdo
parent 78697d2acb
commit b25aa52fb9

View File

@ -191,7 +191,7 @@ def _docker_run(cmd=False, log_path=False, build_dir=False, container_name=False
for dp, hp in enumerate(exposed_ports, start=8069):
ports[f'{dp}/tcp'] = ('127.0.0.1', hp)
ulimits = []
ulimits = [docker.types.Ulimit(name='core', soft=0, hard=0)] # avoid core dump in containers
if cpu_limit:
ulimits.append(docker.types.Ulimit(name='cpu', soft=cpu_limit, hard=cpu_limit))