diff --git a/lazyDir/Gemfile.lock b/lazyDir/Gemfile.lock index 19f6d2b..8f468dc 100644 --- a/lazyDir/Gemfile.lock +++ b/lazyDir/Gemfile.lock @@ -178,7 +178,7 @@ fastlane-plugin-firebase_app_distribution RUBY VERSION - ruby 2.6.5p114 + ruby 2.6.2p47 BUNDLED WITH - 1.17.2 + 2.1.4 diff --git a/lazyDir/centos7.Dockerfile b/lazyDir/centos7.Dockerfile index 01fb1a7..f48c1f1 100644 --- a/lazyDir/centos7.Dockerfile +++ b/lazyDir/centos7.Dockerfile @@ -99,14 +99,17 @@ RUN groupadd -g "${gid}" "${group}" && useradd -ms /bin/bash -g "${group}" -u "${uid}" "${user}" # Copy requirements in non-root user home directory -COPY "Gemfile" "/home/${user}/Gemfile" -COPY "Gemfile.lock" "/home/${user}/Gemfile.lock" +COPY Gemfile Gemfile.lock "/home/${user}/" RUN chown "${user}:${group}" "/home/${user}/Gemfile"* # Switch to non-root user and install requirements USER ${user} WORKDIR /home/${user} -RUN /usr/local/bin/withruby bundler install --path /home/${user}/.gems +RUN /usr/local/bin/withruby gem install bundler --version `sed -n -r -e '/BUNDLED WITH/,$ { s/\s+([.0-9]+)/\1/ p }' Gemfile.lock` +RUN /usr/local/bin/withruby bundler config --global path /home/${user}/.bundle/gems +RUN /usr/local/bin/withruby bundler config --global bin /home/${user}/bin +RUN /usr/local/bin/withruby bundler install +ENV GEM_PATH=/home/${user}/.gem/ruby:/home/${user}/.bundle/gems/ruby/2.6.0:/opt/rh/rh-ruby26/root/usr/share/gems # Prepare locales (for Jekyll) ARG locale=en_US.UTF-8