0
我正在使用碼頭和導軌。如何使用docker安裝本地路徑gem?
我創建了一個本地的寶石,並把它放到供應商/寶石文件夾。
我添加此到我的Gemfile:
gem 'my_gem', path: './vendor/gems/my_gem'
在我Dockerfile
RUN mkdir /testapp
WORKDIR /testapp
ADD Gemfile /testapp/Gemfile
ADD Gemfile.lock /testapp/Gemfile.lock
RUN bundle install
ADD . /testapp
運行docker-compose build
後,它顯示:
The path `/testapp/vendor/gems/my_gem` does not exist.
ERROR: Service 'web' failed to build: The command '/bin/sh -c bundle install' returned a non-zero code: 13
如果路徑不存在,爲什麼不製作它?運行mkdir -p/testapp/vendor/gems/my_gem – yushulx