Docker introduction in Hardware Company
-
Upload
evan-lin -
Category
Technology
-
view
131 -
download
1
Transcript of Docker introduction in Hardware Company
![Page 1: Docker introduction in Hardware Company](https://reader036.fdocuments.us/reader036/viewer/2022062902/58ef2c4e1a28ab680a8b464b/html5/thumbnails/1.jpg)
Introduction Docker for Hardware Company
Evan Lin
![Page 2: Docker introduction in Hardware Company](https://reader036.fdocuments.us/reader036/viewer/2022062902/58ef2c4e1a28ab680a8b464b/html5/thumbnails/2.jpg)
Agenda
❖ Comparison between Docker and VM
❖ Docker Architect
❖ Some examples
❖ Limitations
❖ How to use docker in our daily work
❖ Q&A
![Page 3: Docker introduction in Hardware Company](https://reader036.fdocuments.us/reader036/viewer/2022062902/58ef2c4e1a28ab680a8b464b/html5/thumbnails/3.jpg)
![Page 4: Docker introduction in Hardware Company](https://reader036.fdocuments.us/reader036/viewer/2022062902/58ef2c4e1a28ab680a8b464b/html5/thumbnails/4.jpg)
![Page 5: Docker introduction in Hardware Company](https://reader036.fdocuments.us/reader036/viewer/2022062902/58ef2c4e1a28ab680a8b464b/html5/thumbnails/5.jpg)
![Page 6: Docker introduction in Hardware Company](https://reader036.fdocuments.us/reader036/viewer/2022062902/58ef2c4e1a28ab680a8b464b/html5/thumbnails/6.jpg)
![Page 7: Docker introduction in Hardware Company](https://reader036.fdocuments.us/reader036/viewer/2022062902/58ef2c4e1a28ab680a8b464b/html5/thumbnails/7.jpg)
![Page 8: Docker introduction in Hardware Company](https://reader036.fdocuments.us/reader036/viewer/2022062902/58ef2c4e1a28ab680a8b464b/html5/thumbnails/8.jpg)
Docker Architecture
![Page 9: Docker introduction in Hardware Company](https://reader036.fdocuments.us/reader036/viewer/2022062902/58ef2c4e1a28ab680a8b464b/html5/thumbnails/9.jpg)
Docker
Dockerfile Docker Image
containerbuild run
download image
update
![Page 10: Docker introduction in Hardware Company](https://reader036.fdocuments.us/reader036/viewer/2022062902/58ef2c4e1a28ab680a8b464b/html5/thumbnails/10.jpg)
Some examples
❖ Run docker for launch server in second.
❖ Run docker for compiling modules
❖ Build docker image and run container
![Page 11: Docker introduction in Hardware Company](https://reader036.fdocuments.us/reader036/viewer/2022062902/58ef2c4e1a28ab680a8b464b/html5/thumbnails/11.jpg)
Example 1: Establish a LAMP in second
docker run -d -p 49001:80 dockerfiles/centos-lamp
![Page 12: Docker introduction in Hardware Company](https://reader036.fdocuments.us/reader036/viewer/2022062902/58ef2c4e1a28ab680a8b464b/html5/thumbnails/12.jpg)
Example 1.5: Run second LAMP in the same computer
❖ How much time do we need to launch second LAMP server in VM?
❖ How much time do we need to launch second LAMP server in Docker?
![Page 13: Docker introduction in Hardware Company](https://reader036.fdocuments.us/reader036/viewer/2022062902/58ef2c4e1a28ab680a8b464b/html5/thumbnails/13.jpg)
Example 1.5: Run second LAMP in the same computer
http://evan:49002http://evan:49001
49002:8049001:80
< 1 Second !
![Page 14: Docker introduction in Hardware Company](https://reader036.fdocuments.us/reader036/viewer/2022062902/58ef2c4e1a28ab680a8b464b/html5/thumbnails/14.jpg)
Run VM for compiling modules
PHP 5
Python2
Python3
GCC 4.8
GCC 5.2
PHP 7
Original way in VM
![Page 15: Docker introduction in Hardware Company](https://reader036.fdocuments.us/reader036/viewer/2022062902/58ef2c4e1a28ab680a8b464b/html5/thumbnails/15.jpg)
Run docker for compiling modules
New way in Docker
gcc 5.2gcc 4.8
resultresult
![Page 16: Docker introduction in Hardware Company](https://reader036.fdocuments.us/reader036/viewer/2022062902/58ef2c4e1a28ab680a8b464b/html5/thumbnails/16.jpg)
Run docker for compiling modules
New way in Docker
Ubuntu 15.01 g++ cmake
mount volume
Windows 10
![Page 17: Docker introduction in Hardware Company](https://reader036.fdocuments.us/reader036/viewer/2022062902/58ef2c4e1a28ab680a8b464b/html5/thumbnails/17.jpg)
Build docker image and run container
Dockfiles Image Container
![Page 18: Docker introduction in Hardware Company](https://reader036.fdocuments.us/reader036/viewer/2022062902/58ef2c4e1a28ab680a8b464b/html5/thumbnails/18.jpg)
Build docker image and run container (ex: Linux App)
write Dockfiles
run image as Container
build docker Image
![Page 19: Docker introduction in Hardware Company](https://reader036.fdocuments.us/reader036/viewer/2022062902/58ef2c4e1a28ab680a8b464b/html5/thumbnails/19.jpg)
Build docker image and run container (ex: Linux App)
run sh in Docker Container
![Page 20: Docker introduction in Hardware Company](https://reader036.fdocuments.us/reader036/viewer/2022062902/58ef2c4e1a28ab680a8b464b/html5/thumbnails/20.jpg)
Limitations
❖ No Windows/Mac Image and Container for now
❖ Run on Windows/Mac will launch another ubuntu VM which still limited its memory and CPU
![Page 21: Docker introduction in Hardware Company](https://reader036.fdocuments.us/reader036/viewer/2022062902/58ef2c4e1a28ab680a8b464b/html5/thumbnails/21.jpg)
How to use docker in our daily work
❖ Using dockerfile to store image in Gitlab for CI
❖ Ensure your computer (Host) stay in clean stage
❖ It is very easy to deliver build environment to another college/vendor by passing dockerfile.
![Page 22: Docker introduction in Hardware Company](https://reader036.fdocuments.us/reader036/viewer/2022062902/58ef2c4e1a28ab680a8b464b/html5/thumbnails/22.jpg)
Example: Ensure isolate host environment
gcc 5.2gcc 4.8 gcc + Android NDK Go 1.5
Ubuntu 15.01 + Only install Docker
![Page 23: Docker introduction in Hardware Company](https://reader036.fdocuments.us/reader036/viewer/2022062902/58ef2c4e1a28ab680a8b464b/html5/thumbnails/23.jpg)
Example: Use docker in JNI C++ Library
Original way
Ubuntu 15.01 Android NDK
Cmakeg++
![Page 24: Docker introduction in Hardware Company](https://reader036.fdocuments.us/reader036/viewer/2022062902/58ef2c4e1a28ab680a8b464b/html5/thumbnails/24.jpg)
Example: Use docker in JNI C++ Library
Ubuntu 15.01 + Android NDK Ubuntu 15.01 + cmake + g++
New way in Docker
![Page 25: Docker introduction in Hardware Company](https://reader036.fdocuments.us/reader036/viewer/2022062902/58ef2c4e1a28ab680a8b464b/html5/thumbnails/25.jpg)
Example: Use docker in JNI C++ Library (Dockerfile)
Dockerfile: Ubuntu 15.01 + cmake + g++
![Page 26: Docker introduction in Hardware Company](https://reader036.fdocuments.us/reader036/viewer/2022062902/58ef2c4e1a28ab680a8b464b/html5/thumbnails/26.jpg)
Q&A