provision/docker: fix deploy behavior for failure in the container

Related to #442 and #701.