$ service docker start / stop
$ docker login
$ docker ps
$ docker ps -a
$ docker images
If the Redis image is not available on the host it is downloaded from the Docker hub. The -d option is used to send the container to the background.
$ docker run --name myredis -d redis
$ docker inspect -f '{{ .NetworkSettings.IPAddress }}' myredis
$ docker start / stop myredis
$ docker rm myredis
$ docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -d postgres
$ docker run -it --link some-postgres:postgres --rm postgres sh -c 'exec psql -h "$POSTGRES_PORT_5432_TCP_ADDR" -p "$POSTGRES_PORT_5432_TCP_PORT" -U postgres'