0

I would like to add some Core dump configuration to an Opensips docker container. At present, I am only generating a coredump file with the name "core" (which could be overwritten).

The changes I need to make are:

echo 1 > /proc/sys/kernel/core_uses_pid     --> which generates "core.6645" for example

and

echo 'core.t.sigp' > /proc/sys/kernel/core_pattern     --> This will have the core file contain the process name ( % e ), the timestamp ( % t ), the received signal ( % s ) and the pid file ( % p ) 

The problem is, the /proc/sys/kernel/ filesystem is Read-Only, so both attempts at editing files gets this error when building the image (I added the above commands to the Dockerfile):

/proc/sys/kernel/core_uses_pid': Read-only file system

Any ideas on how I can get around this issue?

1 Answer 1

-1

To solve this, you need create your container with --privileged:

ex.:

docker run --privileged -i --name master --hostname k8s-master -d ubuntu:20.04
Sign up to request clarification or add additional context in comments.

1 Comment

This should not be done unless you want to give your Container all the rights on the host system.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.