Docker: fix docker existance test report error
according to docker inspect --help, docker inspect may report information
for both container and image, if there's a image named "XYZ", and trying to
inspect "XYZ" w/o specifying --format {{.A.B.C}}, it would report image
state instead of container state.
$ sudo docker inspect --help
Usage: docker inspect [OPTIONS] CONTAINER|IMAGE [CONTAINER|IMAGE...] Return low-level information on a container or image
and further more, we should judge if it is really a container,
here we use --format {{.State.Running}}, and more, we should judge if
it is really a container by determining return value, if it is a container,
we should get a string of boolean value "true" or "false", and we can tell it
is a Docker container, but not a Docker image.
if it is a Docker image,
$ sudo docker inspect --format {{.State.Running}} ubuntu:latest
<no value>
if it is a running Docker container,
$ sudo docker inspect --format {{.State.Running}} my_container
true
if it is a stopped Docker container,
$ sudo docker inspect --format {{.State.Running}} my_container
false