Installation
sudo apt-get update
sudo apt-get install linux-image-generic-lts-raring linux-headers-generic-lts-raring
sudo apt-get install linux-image-extra-`uname -r`
sudo sh -c "curl http://get.docker.io/gpg | apt-key add -"
sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
sudo apt-get update
sudo apt-get install lxc-docker
Grab Centos image from Docker repo
sudo docker pull centos
Start new container based on centos
image
sudo docker run -i -t centos /bin/bash
Install LAMP packages inside container environment
$ yum install httpd php php-common php-cli php-pdo php-mysql php-xml php-mbstring mysql mysql-server
$ exit
Snapshot to a new image called LAMP
sudo docker commit 6751f9bcb5c5 LAMP
Run container in background and kick off Apache process
sudo docker run -d -p :80 LAMP /bin/sh -c "/etc/init.d/httpd start; tail -f /var/log/httpd/error_log &> /dev/null"