use docker to setup building environment for a project
来源:互联网 发布:2002数据库怎么使用 编辑:程序博客网 时间:2024/05/16 04:40
setup building environment for visage
1. get ubuntu14.04 docker VM image
docker pull ubuntu:14.04
2. run docker VM
docker run -t -i --privileged --cap-add=ALL -v /home/ping/workspace/visage:/workspace ubuntu:14.04 /bin/bash
project source codes are located in /home/ping/workspace/visage
3. install packages to VM
apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf make gcc g++ vim cmake device-tree-compiler bc pkg-config
in docker VM, install packages
4. do build in docker VM
make u-boot
make kernel
make rootfs
./flash.sh visage mmcblk0p1
build successfully
5. exit and commit docker VM
exit
docker ps -a
docker commit -m "visage build" 29281fc26380 joe/ubuntu:14.04
docker images
6. run next time
docker run -t -i --privileged --cap-add=ALL -v /home/ping/workspace/visage:/workspace joe/ubuntu:14.04 /bin/bash
7. logs
ping@116-15:~/workspace/visage$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
joe/ubuntu 14.04 3c78f8a5d16d 16 minutes ago 209.7 MB
ubuntu 14.04 b549a9959a66 14 hours ago 188 MB
ping/centos centos5 dace46dc23f9 26 hours ago 1.908 GB
ubuntu latest a1e4ed2ac65b 2 days ago 188 MB
centos centos5 505999341f87 5 days ago 284.7 MB
centos centos6 fc73b108c5ae 5 days ago 228.9 MB
ping@116-15:~/workspace/visage$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
29281fc26380 joe/ubuntu:14.04 "/bin/bash" 15 minutes ago Exited (0) 18 seconds ago stupefied_easley
0ec275a7ed09 ubuntu:14.04 "/bin/bash" About an hour ago Exited (130) About an hour ago desperate_payne
566fa4d482df ubuntu:14.04 "/bin/bash" About an hour ago Exited (0) 17 minutes ago mad_jepsen
905c2007d797 centos:centos6 "/bin/bash" 26 hours ago Exited (0) 26 hours ago elated_bardeen
f05cc9181247 ade90d0f477d "/bin/bash" 26 hours ago Exited (0) 26 hours ago cranky_easley
e16a6652cc4c ade90d0f477d "/bin/bash" 26 hours ago Exited (0) 26 hours ago big_newton
fba42f4d933a eb9c039170d9 "/bin/bash" 27 hours ago Exited (0) 27 hours ago tiny_elion
018ddd23a445 fb00c20ef1d9 "/bin/zsh" 27 hours ago Exited (0) 27 hours ago dreamy_meitner
7b9a948487a9 75d8db5f310f "/bin/bash" 27 hours ago Exited (0) 27 hours ago fervent_jang
05ae3a4bb230 75d8db5f310f "/bin/zsh" 27 hours ago Created big_snyder
5d6c75111c52 75d8db5f310f "/bin/bash" 27 hours ago Exited (0) 27 hours ago sad_pasteur
254380bb1fa7 077dae49a759 "/bin/bash" 28 hours ago Exited (0) 28 hours ago nostalgic_hugle
3bdf0b2e6eec 077dae49a759 "/bin/bash" 28 hours ago Exited (0) 28 hours ago loving_ardinghelli
ea7da154d834 ubuntu:latest "/bin/bash" 28 hours ago Exited (0) 28 hours ago evil_cray
7fd2fab0af3d 077dae49a759 "/bin/bash" 29 hours ago Exited (1) 28 hours ago boring_fermi
9461952c3fca 077dae49a759 "/bin/bash" 29 hours ago Exited (0) 29 hours ago determined_bhabha
fa5f07942016 077dae49a759 "/bin/bash" 29 hours ago Exited (0) 29 hours ago pedantic_engelbart
29c986a956d7 077dae49a759 "/bash/bin" 29 hours ago Created sharp_darwin
9e29d043d9dd 077dae49a759 "/bash/bin" 29 hours ago Created kickass_noether
d2f11c04978c 077dae49a759 "/bash/bin" 29 hours ago Created amazing_heisenberg
c29d2ebe0861 centos:centos5 "/bin/bash" 4 days ago Exited (0) 45 hours ago pensive_lumiere
ping@116-15:~/workspace/visage$ docker commit -m "visage build" 29281fc26380 joe/ubuntu:14.04
sha256:e46e9112da3c4ac3bb1f4250c73f31f35671cd8fe68be3d28968b754840e4727
ping@116-15:~/workspace/visage$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
joe/ubuntu 14.04 e46e9112da3c 13 seconds ago 527.5 MB
ubuntu 14.04 b549a9959a66 14 hours ago 188 MB
ping/centos centos5 dace46dc23f9 26 hours ago 1.908 GB
ubuntu latest a1e4ed2ac65b 2 days ago 188 MB
centos centos5 505999341f87 5 days ago 284.7 MB
centos centos6 fc73b108c5ae 5 days ago 228.9 MB
0 0
- use docker to setup building environment for a project
- How to Setup build environment for JB4.2
- Building an application for a non semihosting environment
- How to Setup OpenStack to use Local Disks for Instances
- Building a Jabber Client for iOS: Server Setup
- Building a Jabber Client for iOS: Interface Setup
- Building a Jabber Client for iOS: XMPP Setup
- Building a Jabber Client for iOS: Server Setup
- Building a Jabber Client for iOS: Interface Setup
- Building a Jabber Client for iOS: XMPP Setup
- Building a Jabber Client for iOS: Server Setup
- Building a Jabber Client for iOS: Interface Setup
- Building a Jabber Client for iOS: XMPP Setup
- Building a Jabber Client for iOS: Server Setup
- Building a Jabber Client for iOS: Interface Setup
- Setup Building Environment for Android ICS/FireFox OS from and clean Ubuntu10.04 LTS
- Use vagrant Ubuntu docker environment
- Setup the SSH server to use keys for authentication
- bzoj1927: [Sdoi2010]星际竞速
- [剑指offer]求和1+2+3+....n
- 微信第三方登录
- RocketMQ 消息队列单机部署及使用
- mysql-5.7.11-winx64官方下载版初始化方法
- use docker to setup building environment for a project
- JAVA实现K-means聚类
- stale event(socket的过期事件问题)
- Android的性能优化
- memcache
- 腾讯笔试:>格雷码
- Navicat for Oracle如何连接数据库
- android 获取 imei号码及手机硬件其他信息
- 1540-线段树区间合并操作