.angular 缓存文件夹应该添加到 .dockerignore 吗?

发布于 2025-01-19 07:18:25 字数 76 浏览 3 评论 0原文

最近,通过Angular CLI创建了一个新文件夹'。到.gitignore文件。
我想知道,

Recently updated a Angular project with the ng update command from version 12 to version 13, at build time a new folder '.angular/cache' was created by Angular CLI, and in updates progress, adds this folder to the .gitignore file.
I want to know, Should the .angular cache folder add to .dockerignore? Is this action necessary or it is good practice?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

極樂鬼 2025-01-26 07:18:25

取决于您想要在 docker 镜像中包含什么。如果其目的是仅保留应用程序的构建版本,则您只需要 dist 文件夹中的任何内容。如果它的结果​​用于启动不同的 ng cli 命令,您可能希望为它们提供可用的缓存。

Depends on what do you want to have in your docker image. If its purpose is to only keep build version of your application you just need whatever was in dist folder. If its result is used to start different ng cli commands you may want to have cache available for them.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文