check docker is installed code example
Example 1: how to check if i have docker installed
$ docker -v
Docker version 1.7.0, build 0baf609
$ echo $?
0
Example 2: check if docker is installed ubuntu
$ docker -v
$ docker -v
Docker version 1.7.0, build 0baf609
$ echo $?
0
$ docker -v