缓存文件夹不可写Bitbucket Docker

oiopk7p5  于 2023-02-03  发布在  Docker
关注(0)|答案(1)|浏览(106)

我目前有一个问题,以建立和运行我的应用使用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和一个停靠文件。
谢谢

qoefvg9y

qoefvg9y1#

我遇到了同样的问题(也是使用Docker和Bitbucket管道),除了我使用k8s来部署应用程序。
我所做的是将部署中的下一行更改为false

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

它帮我解决了!

相关问题