gpt4 book ai didi

ruby - Build上的Docker Ruby Bundle权限错误

转载 作者:行者123 更新时间:2023-12-02 20:46:30 25 4
gpt4 key购买 nike

使用docker-compose,我试图构建一个Ruby应用程序(ruby-app)。但是,在构建即将结束时会出错:

There was an error while trying to write to `/ruby-app/Gemfile.lock`. It is likely
that you need to grant write permissions for that path.
ERROR: Service 'ruby-app' failed to build: The command '/bin/sh -c bundle install --jobs 4' returned a non-zero code: 23

不知道为什么现在会出现此权限错误,它已经建立了一段时间了。

最佳答案

问题是我修改了Gemfile,并期望容器内的 bundle 程序根据更改生成新的Gemfile.lock

为了解决这个问题,我在容器外部运行了bundle install。这在我的本地文件系统上生成了一个新的Gemfile.lock,然后我能够按预期构建容器。

关于ruby - Build上的Docker Ruby Bundle权限错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52502175/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com