My 10 most favourite Docker commands

(1) Get the IP address of running Docker Container

docker inspect <container_id> | grep IPAddress | cut -d '"' -f 4
docker inspect $ID | grep IPAddress | cut -d '"' -f 4

(2) Create a named clone/fork of a Docker Image

docker tag ubuntu $USER/geoserver geoserver

(3) Run you own named Docker Image

docker run -i -t z-geoserver /bin/bash

(4) List running Docker Machines

sudo docker ps

(5) List UUIDs only of Docker Images

sudo docker ps -a -q

(6) Create a easy to use alias for a Docker Image

export ID=1ecb8830ba6c
echo $ID

(7) Start a Docker Image

sudo docker start $ID

(8) Stop a Docker Image

docker stop 1ecb8830ba6c

(9) Connect to (attached console to) a running Docker Container

docker attach $CONTAINER_ID

(10) List the Docker Images I have installed

sudo docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
ubuntu              12.04               8dbd9e392a96        9 months ago        128 MB
ubuntu              latest              8dbd9e392a96        9 months ago        128 MB
ubuntu              precise             8dbd9e392a96        9 months ago        128 MB
ubuntu              12.10               b750fe79269d        10 months ago       175.3 MB
ubuntu              quantal             b750fe79269d        10 months ago       175.3 MB
busybox             latest              e9aa60c60128        10 months ago       4.964 MB