easy start of docker on ubuntu14.04 x64

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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值