Skip to content

Instantly share code, notes, and snippets.

@jhonnymoreira
Last active July 12, 2024 02:38
Show Gist options
  • Save jhonnymoreira/777555ea809fd2f7c2ddf71540090526 to your computer and use it in GitHub Desktop.
Save jhonnymoreira/777555ea809fd2f7c2ddf71540090526 to your computer and use it in GitHub Desktop.
rbenv with Docker and Ubuntu 18.04
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
@lgcantarelli
Copy link

humilde

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment