Home > Operation and Maintenance > Docker > How docker generates core files

How docker generates core files

WJ
Release: 2020-06-08 17:00:49
Original
3447 people have browsed it

How docker generates core files

How does docker generate core files?

Steps to generate core files for application services in docker containers:

1. Set the core file generation format and output path

Execute on the physical machine The following command:

 echo "/data/cores/core.%p"  | sudo tee /proc/sys/kernel/core_pattern
Copy after login

2. The docker container is hung from the core file path to the corresponding path of the physical machine.

for example:
     docker run -it -d /tmp/core:/data/cores test:v1.0 /bin/bash
Copy after login

3. Execute in the containerulimit -c umlimited

4. Simulate the core file generated in the container

   kill -s SIGSEGV $$
Copy after login

After executing this command, a core file will be generated under the host /tmp/core

Related recommendations: docker tutorial

The above is the detailed content of How docker generates core files. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template