Ptrace doesn't work in Docker in Xenial and Bionic

We can’t migrate from Trusty to Xenial or Bionic because our (radare2 disassembler and debugger) tests require running debugging tests (to test debugging features obviously) that often require PTRACE. Older environments (Trusty) allowed this. But switching to anything newer doesn’t work, neither with sudo: required nor with sudo: true. Any recommendations how to enable them?

See https://github.com/radareorg/radare2/pull/15460 and resulting travis.yml

The example log of the failing debugging test is here: https://travis-ci.com/radareorg/radare2/jobs/256842198#L1956

Long story short, in Trusty, Docker’s default seccomp profile is not enabled as it should – that’s why it happens to work. In later distributions where that’s fixed, you need to explicitly give the container any additional privileges that it requires.

Thanks for the tip. Do you know what those privileges are, and how to assign them?

OK, but how to unblock the ptrace in the .travis.yml? I found no mention of it anywere.

This is still an issue, and @native-api’s answer doesn’t resolve it. The question is, how can we disable Seccomp for Travis builds?

As @XVilka said, that’s not an answer. The Travis-using community needs an answer specific to Travis, not to Docker in general.

Travis has a stock Docker installed (I don’t know from which package in particular but that can be checked), so any “answer specific to Docker in general” should apply.
Unless you can somehow show that it doesn’t and the problem is at Travis side rather than with your project, the argument is over nothing.