Skip to content

Commit

Permalink
[dist] Setup some convenience binaries
Browse files Browse the repository at this point in the history
Put some links to the 'right' ruby/gem/irb binaries into $PATH.
Makes it easier for people who exec/run the frontend container.
  • Loading branch information
hennevogel committed Oct 5, 2017
1 parent 7d24036 commit afa9ce4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Dockerfile.frontend-base
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,16 @@ RUN chown -R frontend /obs/src/api
# builds this container
USER frontend
WORKDIR /obs/src/api
RUN export NOKOGIRI_USE_SYSTEM_LIBRARIES=1; bundle install --jobs=3 --retry=3

# Set up some convenience ruby binaries...
RUN for i in ruby gem irb; do ln -s /usr/bin/$i.ruby2.4 ~/bin/$i; done

# Install our bundle
# 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

# Switch to root again so we don't block changing our frontend user id...
USER root

# Run our command
Expand Down

0 comments on commit afa9ce4

Please sign in to comment.