Helper functions and Q promise wrappers around dockerode