首页
开发语言
数据库
服务器
常用工具
网络
云
其它
应用软件
DevOops
硬件
其它开发
量化
手机站(wap)
在Dockerfile build时忽略.git/目录的方法
浏览:
76
发布时间:2025-08-08 10:05:06 博主:【张良人】
在 Dockerfile 中,如果你想在 COPY 命令中忽略 .git/ 目录,可以使用 .dockerignore 文件来实现,这是 Docker 的标准做法。
创建 /.dockerignore 文件
.git/