当前位置:网站首页>How to use "copy – link" to accelerate docker to build and optimize cache
How to use "copy – link" to accelerate docker to build and optimize cache
2022-07-29 10:58:00 【mikes zhang】

COPY --link It's a new one BuildKit function , Can greatly accelerate your Docker Mirror construction . It works by copying files into separate image layers that do not depend on their predecessors . You can add new content to the image when there is no basic image on the system .
This function applies to 2022 year 3 Month as Buildx v0.8 Add... As part of . It is contained in Docker CLI edition 20.10.14 in , So if you are running the latest version , You should already be able to access .
In this paper , We will show its –link Function and explain how it works . We will also study some situations where it should not be used .
What is? “– link ”?
link It is available DockerfileCOPY New optional parameters of the instruction . It changes the way copies work by creating a new snapshot layer every time you use it .
routine COPY Statement to add a file to Dockerfile In the layer before them . The content of this layer needs to exist on your disk , So that new content can be merged into :
FROM alpine
COPY my-file /my-file
COPY another-file /another-file
above Dockerfile Copy my-file Go to the layer generated by the previous command . After the instruction FROM, Image by Alpine The content of :
bin/
dev/
etc/
...
First of all COPY Instructions generate an image , This includes coming from Alpine And my-file file :
边栏推荐
- Determine whether the values of two objects are equal
- Spark高效数据分析01、idea开发环境搭建
- Structure the eighth operation of the combat battalion module
- Spark efficient data analysis 01. Establishment of idea development environment
- 重磅 | 基金会为白金、黄金、白银捐赠人授牌
- 开源峰会抢先看 | 7月29日分论坛&活动议程速览
- Discussion on the application of arcing smart electricity in elderly care institutions
- 美团、饿了么被杭州市监约谈要求落实食品安全管理责任 严禁恶意竞争
- One click blog building: how to use WordPress plug-in to build a dedicated blog
- GBase8s Informix Dodker 高可用集群自恢复集群启动命令oninitdb的设计与实现
猜你喜欢

阿里架构师耗时一年整理的《Lucene高级文档》,吃透你也是大厂员工!

【图像检测】基于灰度图像的积累加权边缘检测方法研究附matlab代码

基于flask写的一个小商城mall项目

TCP和UDP

Alibaba architects spent a year sorting out the "Lucene advanced document", and you are also a big factory employee!

Function comparison between report control FastReport and stimulus soft

自采集在线电脑壁纸php源码v2.0自适应端

重磅 | 2022 开放原子全球开源峰会在北京开幕

8.穿插-从架构设计到实践理解ThreadPoolExecutor线程池

开源峰会抢先看 | 7月29日分论坛&活动议程速览
随机推荐
INVALID_ARGUMENT : Invalid rank for input: modelInput Got: 3 Expected: 4 Please fix either the input
VMware: use commands to update or upgrade VMware esxi hosts
Kunlunbase instruction manual (II) best practices for peer-to-peer deployment
深入理解C# 进入快速通道的委托
Alibaba architects spent a year sorting out the "Lucene advanced document", and you are also a big factory employee!
Kunlun storage vs PostgreSQL OLTP test
How to realize the function of adding watermark
『面试知识集锦100篇』1.面试技巧篇丨HR的小心思,你真的懂吗?
大伟 Golang之路
[unity, C #] character keyboard input steering and rotation
How to synchronize when the primary and sub warehouses are modified?
会议OA项目----我的审批
【图像处理】基于中轴变换实现图像骨架提取附matlab代码
Sunwenlong, Secretary General of the open atom open source foundation, worked together to expand open source
就这?TypeScript其实并不难!(建议收藏)
一文搞懂什么是二叉树(二叉树的种类、遍历方式、定义)
北京大学公开课重磅来袭!欢迎走进「AI for Science」课堂
Determine whether the values of two objects are equal
KRYSTAL:审计数据中基于知识图的战术攻击发现框架
leetcode-位运算