check if docker is installed code example
Example 1: Start the Docker daemon
sudo systemctl start docker
sudo service docker start
Example 2: check if docker is running
systemctl status docker
Example 3: how to check if i have docker installed
$ docker -v
Docker version 1.7.0, build 0baf609
$ echo $?
0
Example 4: check if docker is installed ubuntu
$ docker -v