Skip to content

Instantly share code, notes, and snippets.

@tabiodun
Created July 19, 2017 17:20
Show Gist options
  • Save tabiodun/07223c7237ecb891860b4d66781f7d8a to your computer and use it in GitHub Desktop.
Save tabiodun/07223c7237ecb891860b4d66781f7d8a to your computer and use it in GitHub Desktop.
Dockerfile for tabiodun/chrome-headless-ruby
FROM tabiodun/selenium-chrome-headless
RUN apt-get update && apt-get install -qy git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libmysqlclient-dev libffi-dev nodejs
RUN git clone git://github.com/rbenv/rbenv.git /usr/local/rbenv \
&& git clone git://github.com/rbenv/ruby-build.git /usr/local/rbenv/plugins/ruby-build \
&& git clone git://github.com/jf/rbenv-gemset.git /usr/local/rbenv/plugins/rbenv-gemset \
&& /usr/local/rbenv/plugins/ruby-build/install.sh
ENV PATH /usr/local/rbenv/bin:$PATH
ENV RBENV_ROOT /usr/local/rbenv
RUN echo 'export RBENV_ROOT=/usr/local/rbenv' >> /etc/profile.d/rbenv.sh \
&& echo 'export PATH=/usr/local/rbenv/bin:$PATH' >> /etc/profile.d/rbenv.sh \
&& echo 'eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh
RUN echo 'export RBENV_ROOT=/usr/local/rbenv' >> /root/.bashrc \
&& echo 'export PATH=/usr/local/rbenv/bin:$PATH' >> /root/.bashrc \
&& echo 'eval "$(rbenv init -)"' >> /root/.bashrc
ENV CONFIGURE_OPTS --disable-install-doc
ENV PATH /usr/local/rbenv/bin:/usr/local/rbenv/shims:$PATH
RUN eval "$(rbenv init -)"; rbenv install 2.4.1 \
&& eval "$(rbenv init -)"; rbenv global 2.4.1 \
&& eval "$(rbenv init -)"; gem update --system \
&& eval "$(rbenv init -)"; gem install bundler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment