I have a docker container, which has CPP code in it.
void SetRealtimeThreadPriority()
{
sched_param const param{ThreadPriorities::Priority()};
int result = pthread_setschedparam(pthread_self(), ThreadPriorities::Policy(), ¶m);
printf("SetRealtimeThreadPriority - result checked for assertion %d \n", result);
assert(result == 0); (void) result;
}
when I run the exe which has this code in ubuntu machine it works fine, where result printed is 0(zero). but when I run it in container, the assert is failing.
I have gone through multiple threads, man pages, docker run documentation and articles and tried running the container with below options, but no luck.
docker run -it --rm --cap-add SYS_NICE MyContainer
docker run --cap-add=ALL --privileged MyContainer
docker run --cap-add=ALL MyContainer
docker run -it --rm --userns host --cap-add SYS_NICE MyContainer
How can I debug this issue? Im running docker on wsl ubuntu 16.04.