Fix for Docker compatibility

This makes [my Dockerfile](https://github.com/FiloSottile/warrior-dockerfile) work.

All the rest of the code is untouched and fetched from the official repos.

You might want to keep this in a branch.

Detects DOCKER env variable.