Handling error of docker process execution.

At the moment if for some reason the docker process fails no information is given to the user and the build ends with success. This patch checks the return states of the docker process, throws an exception if something went wrong and the process stderr is returned.