Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add coredump config to cartridge pack docker #707

Open
dj-kostya opened this issue May 25, 2022 · 1 comment
Open

Add coredump config to cartridge pack docker #707

dj-kostya opened this issue May 25, 2022 · 1 comment
Assignees
Labels
feature A new functionality

Comments

@dj-kostya
Copy link

Предлагаю добавить опцию при сборке docker контейнера, которая включит сборку coredump в отдельный volume.

Для создания coredump внутри docker контейнера, необходимо:

Текущие наработки:

New dockerfile

FROM <base_cartridge_img_based_in_centos>

USER root
COPY ./coredump_entrypoint.sh /tmp/coredump_entrypoint.sh
RUN yum install -y gdb
RUN chmod +x /tmp/coredump_entrypoint.sh
ENTRYPOINT ["/bin/sh","/tmp/coredump_entrypoint.sh"]

CMD <CMD_FROM_base_cartridge_img_based_in_centos>

coredump_entrypoint.sh:

#!/bin/sh

ulimit -c unlimited
sysctl -w kernel.core_pattern="/tmp/coredumps/core.%e.%p"

exec "$@"

Важно! Контейнер необходимо запускать с privileged: true

@dj-kostya dj-kostya added the feature A new functionality label May 25, 2022
@Totktonada
Copy link
Member

Assigned to the product team to triage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new functionality
Projects
None yet
Development

No branches or pull requests

4 participants