当前位置:网站首页>Efficiency improvement - encourage personalized container development environment
Efficiency improvement - encourage personalized container development environment
2022-07-01 22:46:00 【mariolu】
The background is that our company has a complex project , This project cites 27 Time submodule, use cicd The development efficiency of test environment is very slow , because cicd The clean-up space before construction is opened on , Every compilation is a huge amount git Pulling process , compile cache Will also be emptied together , So do a compilation , Twenty or thirty minutes passed , And it may only take 20 or 30 minutes to solve a development compilation error . Time is not worth the loss .
One 、Dockerfile Description file
So I had an idea . on-line cicd According to this docker Description file compiled
In vernacular, this description file ,
- Go online to download a centos7.4 Mirror image ,
- Package the compiled program in the directory zip Files in /data/app/approot Under the table of contents ,
- yum Install some allowed or necessary packages
- Then execute some subsequent commands .
Two 、 Create a mirror image image
Well, according to this document , Execute the following command
sudo docker build -t fullfish/toucan -f ./Dockerfile .
-f It specifies Dockerfile The path of ,-t Represents generated image name ,
If these steps are successful , And then you can use it docker image ls Check the just packed image
3、 ... and 、 Start the mirror
And start this image,sudo docker run -d --rm -it --entrypoint bash fullfish/toucan
Then you can use docker container ls Check this startup container example .
And then you can use it id perhaps names Enter this container,sudo docker exec -it 3bd8d0b98146 bash
perhaps sudo docker exec -it silly_spence bash
And then this container Inside , We put the engineering code git download , In addition, complete the whole compilation environment . For example, my project
These necessary third-party components are missing ,
One of the more interesting things is libstdc++-static, This bag is actually very hidden , Because my code is statically compiled libstdc++, So even if there is libstdc++.so No way . This missing error will be reported in the code linkbase stage . The other is gcc-c++, This is actually centos7 Of gcc4.8 edition .
In this way, the image package is based on offline cicd Environmental Science centos7 The image package includes these necessary packages and gcc4.8 development environment .
Four 、 according to container Generate a new image
Well, I'm here too Dockerfile Improved some dependency library information . Next I'm going to put this image Share with colleagues , How to do it . That is to say, make this perfect container generating image. Then colleagues can according to this new image Make their own development environment .
use docker commit Submit this id,
sudo docker commit 3bd8d0b98146
And then use docker tag Generate a memorable name
sudo docker tag 6e939bf3a45b toucan_dev
Then colleagues can happily use the new image toucan_dev 了 , Use this image package to enter docker Development , You don't have to rely on cicd Compile and debug on
边栏推荐
- twenty million two hundred and twenty thousand seven hundred and one
- 利用SecureCRTPortable远程连接虚拟机
- CIO's discussion and Analysis on the definition of high-performance it team
- 【juc学习之路第8天】Condition
- 【日常训练】326. 3 的幂
- Sonic cloud real machine learning summary 6 - 1.4.1 server and agent deployment
- 【无标题】
- 3DE resources have nothing or nothing wrong
- Matlab traverses images, string arrays and other basic operations
- MySQL的视图练习题
猜你喜欢
随机推荐
详解Kubernetes网络模型
Appium automated testing foundation - Supplement: introduction to desired capabilities parameters
flink sql-client 使用 对照并熟悉官方文档
C#/VB. Net to add text / image watermarks to PDF documents
Slope compensation
Redis configuration and optimization
2020-ViT ICLR
[untitled]
linux下清理系统缓存并释放内存
园区全光技术选型-中篇
IDA动态调试apk
91.(cesium篇)cesium火箭发射模拟
Gaussdb (DWS) active prevention and troubleshooting
LC501. 二叉搜索树中的众数
spark analyze命令使用及其作用 map join broadcast join 广播join
功能测试报告的编写
MySQL中对于事务的理解
使用 Three.js 实现'雪糕'地球,让地球也凉爽一夏
性能测试计划怎么编写
twenty million two hundred and twenty thousand seven hundred and one