나중에 공유하기 위해 코어 덤프를 /ap_core 디렉토리로 리디렉션
mkdir -p /ap_core && chmod 1777 /ap_core
cat /proc/sys/kernel/core_pattern
echo '/ap_core/core.t%t.u%u.s%s.p%p.%e' > /proc/sys/kernel/core_pattern
ls -alZ /ap_core
drwxrwxrwt. 2 root root unconfined_u:object_r:default_t:s0 15 Sep 5 10:10 .
dr-xr-xr-x. 19 root root system_u:object_r:root_t:s0 253 Jun 19 15:20 ..
컨테이너를 시작하다
podman run --rm -i -t -v /ap_core:/ap_core:z ubi8/ubi-micro
sh-4.4# ls -al /ap_core
ls: cannot open directory '/ap_core': Permission denied
sh-4.4# ls -alZd /ap_core
drwxrwxrwt. 2 nobody nobody unconfined_u:object_r:default_t:s0 15 Sep 5 02:10 /ap_core
답변1
이 옵션을 추가하면 --security-opt label=disable
이 :z
필요하지 않습니다.
podman run --rm -i -t --security-opt label=disable -v /ap_core:/ap_core ubi8/ubi-micro