尝试使用docker在redmine中安装插件。我是Redmine的新手,只知道Docker基础知识。我对Ruby不了解,所以请idk这些Gemfiles安装如何工作。
我正在尝试安装Issue recurring。该插件的安装说明看起来很简单:
su - redmine
git -C /var/lib/redmine/plugins/ clone https://github.com/cryptogopher/issue_recurring.git
cd /var/lib/redmine
bundle install
RAILS_ENV=production rake redmine:plugins:migrate
所以我试图将其转换为Dockerfile:
FROM redmine:3.3
RUN mkdir -p /var/lib/redmine/plugins/
RUN chown -R redmine:redmine /var/lib/redmine
#su - redmine
USER redmine
RUN git -C /var/lib/redmine/plugins/ clone https://github.com/cryptogopher/issue_recurring.git
#cd /var/lib/redmine
WORKDIR /var/lib/redmine/
#bundle install
RUN bundle install
#RAILS_ENV=production rake redmine:plugins:migrate
ENV RAILS_ENV production
RUN rake redmine:plugins:migrate
但是我得到的是:
...
Step 7/9 : RUN bundle install
---> Running in 1139cd4ccb43
Could not locate Gemfile
The command '/bin/sh -c bundle install' returned a non-zero code: 10
我在这里做错什么了吗,还是插件中有错误?我不知道在Ruby中没有经验。我也尝试在“ / var / lib / redmine / plugins /”和“ / var / lib / redmine / plugins / issue-recurring /”中运行“捆绑安装”,但结果相同。
答案 0 :(得分:2)
对于任何寻求解决方案的人,它都在这里:https://it.michalczyk.pro/issues/15
节选:
我发现了问题。它没有安装在/ var / lib / redmine /下,而是安装在“ / usr / src / redmine”下!我假设/ var / lib / redmine /是标准目录...
答案 1 :(得分:0)
该插件的安装说明似乎适用于非docker场景。像他们在这里一样尝试“ redmine bundle install”: https://github.com/docker-library/redmine/blob/master/3.3/Dockerfile#L129