title: How to setting Core file size in Docker container?
body: <p>I want to set core file size to unlimited in a Docker container. </p>
  
  <p>I tried changing <code>limits.conf</code> in container. </p>
  
  <h3>Dockerfile</h3>
  
  <pre><code>RUN sed -i.bak '/\# End of file/ i\\* soft core unlimited' /etc/security/limits.conf
  RUN sed -i.bak '/\# End of file/ i\\* hard core unlimited' /etc/security/limits.conf
  </code></pre>
  
  <p>I restarted the container but that didn't work.</p>
  
  <p>Core file size is always 0. </p>
  
  <p>I can use the command </p>
  
  <pre><code>$ ulimit -c unlimited
  </code></pre>
  
  <p>for setting core file size. But I have to use the command for another application.
  So I don't want us these commands.</p>
  
  <p>Please let me know how I can change the core file size in a Docker container.</p>