2

Trying to install a plugin in redmine, using docker. I'm new to redmine, and just know the docker basics. I have no knowledge of Ruby, so idk how those Gemfiles installations work.

I'm trying to install Issue recurring. The installation instructions for the plugin look straightforward:

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

So I tried to translate that into a 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

But what I get is:

...
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

Am I doing something wrong here, or is there a bug in the plugin? Being inexperienced in Ruby, I cannot tell. I tried running "bundle install" in "/var/lib/redmine/plugins/" and "/var/lib/redmine/plugins/issue-recurring/" too, but same result.

Sebastien Diot
  • 7,183
  • 6
  • 43
  • 85

2 Answers2

2

For anyone looking for solution, it's here: https://it.michalczyk.pro/issues/15

Excerpt:

I found the problem. It's not installed under /var/lib/redmine/, it's installed under "/usr/src/redmine"! I was assuming /var/lib/redmine/ is the standard directory...

0

The installation instruction of the plugin seems to for non-docker scenario. Try "redmine bundle install" like they have done Here: https://github.com/docker-library/redmine/blob/master/3.3/Dockerfile#L129

Nirdosh Gautam
  • 236
  • 2
  • 5
  • "redmine" isn't an executable; "find / -executable -type f -name redmine" returns nothing. In the link you are referencing, I believe that "redmine" in "gosu redmine bundle install" is the name of the user gosu should use, rather than a command (I have never used gosu, so I could be wrong). – Sebastien Diot Mar 18 '19 at 12:25