8
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

posted at

Docker環境でstrace

starceしようとしたらエラーになったので。

root:/# strace /bin/ls
strace: ptrace(PTRACE_TRACEME, ...): Operation not permitted
+++ exited with 1 +++

ぐぐれば何か出てきますよね。。。

起動オプションを追加すればよいようです。

--security-opt seccomp:unconfined

このオプションを追加したコンテナでstraceを実行すると

root@aca47db0b5ff:/# strace /bin/ls
execve("/bin/ls", ["/bin/ls"], [/* 9 vars */]) = 0
brk(NULL) = 0x72f000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbbdf0de000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
...

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
8
Help us understand the problem. What are the problem?