Some env vars MUST be copied to docker CLI calls
There are some environment variables that MUST match the environment passed to behave for calls to the docker
CLI to function as expect (or at all):
-
PATH
: Needed to find the CLI if in a directory that is not considered "default" -
DOCKER_HOST
: Needed to contact a remote Docker daemon
In general, the original environment should be copied for each run([DOCKER, ...], env=..., ...)
call