how to test if docker is working code example
Example 1: check if docker is running
systemctl status docker
Example 2: how check status docker in ubuntu
sudo systemctl status docker
#(OR)
systemctl status docker.service
# To check the status of Docker whether running or not.
Example 3: how to test if docker is running from boot
#to check if docker is installed run
$ docker --version
#to check if docker is running run command
$ systemctl status docker