-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Install Ruby with ruby-install #5356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,6 +27,9 @@ RUN apt-get update \ | |
| file \ | ||
| zlib1g-dev \ | ||
| liblzma-dev \ | ||
| libyaml-dev \ | ||
| libgdbm-dev \ | ||
| bison \ | ||
| tzdata \ | ||
| zip \ | ||
| unzip \ | ||
|
|
@@ -65,23 +68,34 @@ RUN if ! getent group "$USER_GID"; then groupadd --gid "$USER_GID" dependabot ; | |
|
|
||
| ### RUBY | ||
|
|
||
| # Install Ruby, update RubyGems, and install Bundler | ||
| ENV BUNDLE_SILENCE_ROOT_WARNING=1 | ||
| ARG RUBY_VERSION=2.7.5 | ||
| ARG RUBY_INSTALL_VERSION=0.8.3 | ||
|
|
||
| ARG RUBYGEMS_SYSTEM_VERSION=3.2.20 | ||
| # Disable the outdated rubygems installation from being loaded | ||
| ENV DEBIAN_DISABLE_RUBYGEMS_INTEGRATION=true | ||
|
|
||
| ARG BUNDLER_V1_VERSION=1.17.3 | ||
| ARG BUNDLER_V2_VERSION=2.3.13 | ||
|
Comment on lines
+78
to
+79
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I really like this update 🥇 💡 Seeing this change makes me wonder if we could take it further. What do you think about making these
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't fully recall the whole thing from my work on #4973, but I'm pretty sure if |
||
| ENV BUNDLE_SILENCE_ROOT_WARNING=1 | ||
| # Allow gem installs as the dependabot user | ||
| ENV BUNDLE_PATH=".bundle" \ | ||
| BUNDLE_BIN=".bundle/bin" | ||
| ENV PATH="$BUNDLE_BIN:$PATH:$BUNDLE_PATH/bin" | ||
| RUN apt-add-repository ppa:brightbox/ruby-ng \ | ||
| && apt-get update \ | ||
| && apt-get install -y --no-install-recommends ruby2.7 ruby2.7-dev \ | ||
| && gem update --system 3.2.20 \ | ||
| && gem install bundler -v 1.17.3 --no-document \ | ||
| && gem install bundler -v 2.3.13 --no-document \ | ||
| && rm -rf /var/lib/gems/2.7.0/cache/* \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Install Ruby, update RubyGems, and install Bundler | ||
| RUN mkdir -p /tmp/ruby-install \ | ||
| && cd /tmp/ruby-install \ | ||
| && curl -fsSL "https://github.com/postmodern/ruby-install/archive/v$RUBY_INSTALL_VERSION.tar.gz" -o ruby-install-$RUBY_INSTALL_VERSION.tar.gz \ | ||
mattt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| && tar -xzvf ruby-install-$RUBY_INSTALL_VERSION.tar.gz \ | ||
| && cd ruby-install-$RUBY_INSTALL_VERSION/ \ | ||
| && make \ | ||
| && ./bin/ruby-install --system ruby $RUBY_VERSION \ | ||
| && gem update --system $RUBYGEMS_SYSTEM_VERSION \ | ||
| && gem install bundler -v $BUNDLER_V1_VERSION --no-document \ | ||
| && gem install bundler -v $BUNDLER_V2_VERSION --no-document \ | ||
| && rm -rf /var/lib/gems/*/cache/* \ | ||
| && rm -rf /tmp/ruby-install | ||
|
|
||
| ### PYTHON | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.