From afa9ce4ccf04745b0c93945b2257b87388c37872 Mon Sep 17 00:00:00 2001 From: Henne Vogelsang Date: Thu, 5 Oct 2017 11:40:51 +0200 Subject: [PATCH] [dist] Setup some convenience binaries Put some links to the 'right' ruby/gem/irb binaries into $PATH. Makes it easier for people who exec/run the frontend container. --- Dockerfile.frontend-base | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Dockerfile.frontend-base b/Dockerfile.frontend-base index f0be24ef4b3..113c9c9cc4b 100644 --- a/Dockerfile.frontend-base +++ b/Dockerfile.frontend-base @@ -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