Right now it is difficult. Docker doesn't support it directly. There is a lot of demand for it:
https://github.com/docker/docker/issues/1228
You have to use nsenter, which is OK, but requires additional installation:
https://github.com/jpetazzo/nsenter
It looks as though an-almost-but-not-quite-the-same thing will land in Docker at some point:
https://github.com/docker/docker/pull/7409
And this shell is another attempt to make a very useful feature available.