1. install on ubuntu14.04 x64
sudo apt-get install curl
curl -sSL https://get.docker.com/ | sh
2. get centos:centos5 docker image
docker pull centos:centos5
3. run centos:centos5 docker image
docker run -t -i --privileged --cap-add=ALL centos:centos5 /bin/bash
4. setup environment
yum install subversion gcc gcc_c++ make ...
5. get codes from svn server
svn co
https://xxx.xxx.xxx.xxx/xxx/source_code
6. commit docker image
docker ps -a
docker commit -m="ninja fct" 254380bb1fa7 ping/centos:centos5
7. save docker image
docker save ping/centos:centos5 | bzip2 -9 -c>ninja_fct.tar.bz2
8. import docker image
on another docker machine:
bzip2 -d -c<ninja_fct.tar.bz2 | docker load
docker run -t -i --privileged --cap-add=ALL centos:centos5 /bin/bash
9. share data from host
docker run -t -i --privileged --cap-add=ALL -v /home/ping/workspace:/home/workspace ping/centos:centos5 /bin/bash