Skip to content

Instantly share code, notes, and snippets.

@hfm
Created January 15, 2018 14:07
Show Gist options
  • Save hfm/d5f901a8505b65eb11e39018273282f2 to your computer and use it in GitHub Desktop.
Save hfm/d5f901a8505b65eb11e39018273282f2 to your computer and use it in GitHub Desktop.
デイズで ruby 2.5.0 を使うためのビルドファイル
FROM centos:7
RUN yum install -y -q git gcc make bzip2 openssl-devel libyaml-devel libffi-devel readline-devel zlib-devel gdbm-devel ncurses-devel
RUN git clone -q https://github.com/rbenv/rbenv.git /usr/local/rbenv
RUN git clone -q https://github.com/rbenv/ruby-build.git /usr/local/rbenv/plugins/ruby-build
ENV RBENV_ROOT "/usr/local/rbenv"
ENV RUBY_VERSION 2.5.0
RUN /usr/local/rbenv/bin/rbenv install $RUBY_VERSION
RUN /usr/local/rbenv/bin/rbenv global $RUBY_VERSION
RUN /usr/local/rbenv/shims/gem i bundler --no-document
CMD ["tar", "czf", "/tmp/rbenv_2.5.0.tgz", "-C", "/usr/local/rbenv/versions/", "2.5.0"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment