Login to Hub

docker login

Show version

docker version

Search an image or repository

docker search <image>

Download a repository

docker pull <username>/<repository>

Run repository

docker run <username>/<repository>

Example:

docker run -d -t -i -p 80:80 ubuntu:14.04 /bin/bash

(the image will be pulled, if it doesn`t exist localy)
-d - run the container in the background
-p - required network ports inside our container to our host

docker run <username>/<repository> apt-get install -y wget (install a simple utility. use -y for noninteractive mode installation.)

docker run <username>/<newrepository> ping <IP_for_ping>

Go to the running container

sudo docker attach <CONTAINER_ID>

Show all local containers

docker ps -l

Show container details

docker inspect <CONTAINER_ID>

Save container changes

docker commit <CONTAINER_ID > <username>/<new_image>

Push your container to the repository

docker push <username>/< new_image>