Skip to content

Commit

Permalink
Merge pull request #4460 from bgeuken/adapt_docker_to_rupy2.5
Browse files Browse the repository at this point in the history
Adapt dockerimages to ruby2.5
  • Loading branch information
ChrisBr authored Feb 8, 2018
2 parents 06296f6 + 4d5591f commit 7b5ec6d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ USER frontend
WORKDIR /obs/src/api
# foreman, which we only run in docker, needs a different thor version than OBS.
# Installing the gem directly spares us from having to rpm package two different thor versions.
RUN gem install thor:0.19 foreman
RUN sudo gem.ruby2.5 install thor:0.19 foreman
# Ensure there is a foreman command without ruby suffix
RUN sudo ln -s /usr/bin/foreman.ruby2.5 /usr/bin/foreman

# FIXME: Retrying bundler if it fails is a workaround for https://github.com/moby/moby/issues/783
# which seems to happen on openSUSE (< Tumbleweed 20171001)...
RUN export NOKOGIRI_USE_SYSTEM_LIBRARIES=1; bundle install --jobs=3 --retry=3 || bundle install --jobs=3 --retry=3

# Run our command
CMD ["foreman", "start", "-f", "Procfile"]
CMD ["foreman", "start", "-f", "Procfile"]
2 changes: 1 addition & 1 deletion Dockerfile.frontend-base
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN chown -R frontend /obs/src/api
USER frontend
WORKDIR /obs/src/api

# Set up some convenience ruby binaries...
# Ensure there are ruby, gem and irb commands without ruby suffix
RUN for i in ruby gem irb; do ln -s /usr/bin/$i.ruby2.5 ~/bin/$i; done

# Install our bundle
Expand Down

0 comments on commit 7b5ec6d

Please sign in to comment.