docker status code example

Example 1: 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 2: 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

Example 3: see docker status

## To View the status of Docker
$ docker ps

CONTAINER ID        IMAGE                        COMMAND                CREATED              STATUS              PORTS               NAMES
4c01db0b339c        ubuntu:12.04                 bash                   17 seconds ago       Up 16 seconds       3300-3310/tcp       webapp
d7886598dbe2        crosbymichael/redis:latest   /redis-server --dir    33 minutes ago       Up 33 minutes       6379/tcp            redis,webapp/db

Tags:

Misc Example