provision/docker: fix code and build

Using the proper error fixes the build (+race), and the error reporting
itself.