Ensure Docker client uses exit codes when errors occur

This patchset essentially ensures that the Docker client actually exits with error codes if an error is encountered.

Docker-DCO-1.1-Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)
Why pointers everywhere? It's pretty hard work for GC find short-lived pointers.