docker::c++程序添加corecump配置。
2021-04-14 00:28
标签:bsp div -name ++ color alt file core red docker::c++程序添加corecump配置。 标签:bsp div -name ++ color alt file core red 原文地址:https://www.cnblogs.com/osbreak/p/13339177.html1、在dockerfile中添加:
RUN echo "kernel.core_pattern = /cms/log/core.%e.%p.%t">/etc/sysctl.conf //指定coredump文件路径/cms/log/
RUN sysctl -p //使设定生效
2、docker run 时 添加 --privileged=true
如:docker run --name coredumpDemo --privileged=true -v /usr/local/cms_yd/log:/cms/log -v /etc/localtime:/etc/localtime -d coredump