缓存文件夹不可写 Bitbucket Docker

发布于 2025-01-16 13:20:05 字数 707 浏览 1 评论 0原文

我目前在使用 bitbucket 管道构建和运行我的应用程序时遇到问题:

我有一个关于不可写的缓存文件夹的错误:

warning Skipping preferred cache folder "/home/node/.cache/yarn" because it is not writable.
warning Skipping preferred cache folder "/tmp/.yarn-cache-1000" because it is not writable.
warning Skipping preferred cache folder "/tmp/.yarn-cache" because it is not writable.
error Yarn hasn't been able to find a cache folder it can use. Please use the explicit -- 
cache-folder option to tell it what location to use, or make one of the preferred locations 
writable.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

我正在使用 bitbucket-pipelines.yml 和 dockerfile。

谢谢

I have currently a problem to build and to run my app using bitbucket pipeline:

I have a error about the cache folder which is not writable:

warning Skipping preferred cache folder "/home/node/.cache/yarn" because it is not writable.
warning Skipping preferred cache folder "/tmp/.yarn-cache-1000" because it is not writable.
warning Skipping preferred cache folder "/tmp/.yarn-cache" because it is not writable.
error Yarn hasn't been able to find a cache folder it can use. Please use the explicit -- 
cache-folder option to tell it what location to use, or make one of the preferred locations 
writable.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I'm using a bitbucket-pipelines.yml and a dockerfile.

Thank you

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

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

发布评论

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

评论(1

極樂鬼 2025-01-23 13:20:05

我遇到了同样的问题(也使用 Docker 和 Bitbucket Pipelines)。只是我使用 k8s 来部署应用程序。

我所做的是将部署中的下一行更改为 false:

securityContext:
      readOnlyRootFilesystem: false (it was `true`)

它为我解决了这个问题!

I came across the same problem (also using Docker and Bitbucket Pipelines). Except that I was using k8s to deploy the app.

What I did was change the next line in my deployment to false:

securityContext:
      readOnlyRootFilesystem: false (it was `true`)

It solved it for me!

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