support #15

Basic Dockerfile following installation steps fails with "Could not locate Gemfile"

Added by skunkiferous 4 months ago. Updated 4 months ago.




I tried to install your plugin using an original redmine docker image, and your instructions, converted to docker commands. It does not work for me. As I know nothing about ruby, gemfiles, ..., I cannot debug the issue myself. I asked on Stackoverflow first, but got no reply so far. Here is the link to my SO question:

And a copy of the question:

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

Token votes


#1 Updated by skunkiferous 4 months ago

EDIT: I've researched the subject somewhat. From my newly found understanding, "bundle install" expects a "Gemfile" somewhere. There doesn't seem to be a Gemfile anywhere in you git repo, so how is it even meant to work, with or without Docker? Also, that would explain the error message, which seems to be literally the problem.

#2 Updated by cryptogopher 4 months ago

  • Status changed from new to in progress

skunkiferous wrote:

"bundle install" expects a "Gemfile" somewhere. There doesn't seem to be a Gemfile anywhere in you git repo

Redmine plugins are not required to have their own Gemfile (though they can have one if needed). I suspect that there is no Gemfile inside Redmine installation directory - /var/lib/redmine. This one is required. Try to ls /var/lib/redmine/Gemfile* to check if it is available.

In case there are still problems, please let me know what is the source of docker image you're using.

#3 Updated by skunkiferous 4 months ago

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

#4 Updated by cryptogopher 4 months ago

  • Status changed from in progress to closed

Great that you managed to work it out!

Also available in: Atom PDF