task #15
closedBasic Dockerfile following installation steps fails with "Could not locate Gemfile"
Description
Hi.
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 https://github.com/cryptogopher/issue_recurring.git
    cd /var/lib/redmine
    bundle install
    RAILS_ENV=production rake redmine:plugins:migrateSo 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:migrateBut 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: 10Am 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.
       Updated by skunkiferous over 6 years ago
      Updated by skunkiferous over 6 years 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.
       Updated by cryptogopher over 6 years ago
      Updated by cryptogopher over 6 years 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.
       Updated by skunkiferous over 6 years ago
      Updated by skunkiferous over 6 years 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...
       Updated by cryptogopher over 6 years ago
      Updated by cryptogopher over 6 years ago
      
    
    - Status changed from in progress to closed
Great that you managed to work it out!
       Updated by admin over 2 years ago
      Updated by admin over 2 years ago
      
    
    - Tracker changed from 3 to task
- Target version set to unspecified