Right now, Docker uses Linux kernel specific functionality to do name spacing and permissions - though there was an experimental jails implementation at one point, and Microsoft are working towards a native Windows server based Docker backend.
To support QNX and VxWorks, code needs to be written - presumably by someone that knows those kernels well.
You could however try out docker on an embedded linux running the real time patches (i’m guessing they’re not all merged yet)