Using the following command one can install docker. I have done the same using Ubuntu-14-04 instance. For richer options refer the docker official site
wget -qO- https://get.docker.com/ | sh
Now run the following command from any machine on which docker is installed.
docker run -d -t -p 8888:8888 prabeeshk/pyspark-notebook
After successfully running the pyspark-notebook docker container, access pyspark ipython notebook by