4
我正在尝试与码头运行一个rails应用程序。有其越来越受github上的SSH网址安装几颗宝石,内容如下:私人宝石没有安装在码头上
的Gemfile
gem 'swagger-docs', :git => '[email protected]:xyz/swagger-docs.git', :branch => 'my_branch'
我已经添加在泊坞窗keys
它能够克隆所需回购并从git安装gems。
Dockerfile
RUN mkdir -p /root/.ssh
COPY ./id_rsa /root/.ssh/id_rsa
RUN chmod 700 /root/.ssh/id_rsa
RUN ssh-keygen -f /root/.ssh/id_rsa -y > /root/.ssh/id_rsa.pub
RUN ssh-keyscan github.com >> /root/.ssh/known_hosts
当我建立它(包括bundle install
),一切顺利的话,图像被成功地建立。但是,当我运行docker-compose up
,它提供了以下错误
/usr/local/bundle/gems/bundler-1.9.2/lib/bundler/source/git/git_proxy.rb:155:in `allowed_in_path': The git source [email protected]:xyz/swagger-docs.git is not yet checked out. Please run `bundle install` before trying to start your application (Bundler::GitError)
复制密钥后,您的Dockerfile是否包含“RUN bundle install”? –
@NabeelAmjad是当然。 –