Last active
July 12, 2024 02:38
-
-
Save jhonnymoreira/777555ea809fd2f7c2ddf71540090526 to your computer and use it in GitHub Desktop.
rbenv with Docker and Ubuntu 18.04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:18.04 | |
RUN apt-get update && apt-get install -y \ | |
autoconf \ | |
bison \ | |
build-essential \ | |
curl \ | |
gcc-6 \ | |
git \ | |
libffi-dev \ | |
libgdbm-dev \ | |
libgdbm5 \ | |
libncurses5-dev \ | |
libreadline6-dev \ | |
libssl-dev \ | |
libyaml-dev \ | |
zlib1g-dev | |
ENV RBENV_ROOT /usr/local/src/rbenv | |
ENV RUBY_VERSION 2.5.1 | |
ENV PATH ${RBENV_ROOT}/bin:${RBENV_ROOT}/shims:$PATH | |
RUN git clone https://github.com/rbenv/rbenv.git ${RBENV_ROOT} \ | |
&& git clone https://github.com/rbenv/ruby-build.git \ | |
${RBENV_ROOT}/plugins/ruby-build \ | |
&& ${RBENV_ROOT}/plugins/ruby-build/install.sh \ | |
&& echo 'eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh | |
RUN rbenv install ${RUBY_VERSION} \ | |
&& rbenv global ${RUBY_VERSION} | |
RUN gem install bundler |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
humilde