Skip to content

Instantly share code, notes, and snippets.

@isuke
Last active March 3, 2017 15:48
Show Gist options
  • Save isuke/316044575d9c97b41e38bac77e21366d to your computer and use it in GitHub Desktop.
Save isuke/316044575d9c97b41e38bac77e21366d to your computer and use it in GitHub Desktop.
FROM ubuntu
#
# prepare
#
RUN apt-get update && \
apt-get upgrade -y
#
# utils
#
RUN apt-get install -y curl wget git sudo
#
# rvm
#
RUN apt-get install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev && \
gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3 && \
curl -sSL https://get.rvm.io | bash -s stable && \
source /usr/local/rvm/scripts/rvm && \
gem install bundler
#
# rbenv
#
# RUN apt-get install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev && \
# git clone https://github.com/sstephenson/rbenv.git /usr/local/rbenv && \
# git clone https://github.com/sstephenson/ruby-build.git /usr/local/rbenv/plugins/ruby-build && \
# echo 'export RBENV_ROOT="/usr/local/rbenv"' >> $HOME/.bashrc && \
# echo 'export PATH="${RBENV_ROOT}/bin:${PATH}"' >> $HOME/.bashrc && \
# echo 'eval "$(rbenv init -)"' >> $HOME/.bashrc && \
# source ~/.bashrc && \
# rbenv rehash
#
# ruby
#
ENV RUBY_VERSION=2.3.3
RUN rvm install $RUBY_VERSION && \
rvm --default use $RUBY_VERSION
#
# ruby and rails
#
RUN echo "RAILS_ENV=test" | sudo tee -a /etc/environment && \
echo "RACK_ENV=test" | sudo tee -a /etc/environment
#
# Phantomjs
#
RUN cd /tmp && \
wget -U "" https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 && \
tar xfj phantomjs-2.1.1-linux-x86_64.tar.bz2 && \
cp /tmp/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin
#
# ImageMagick
#
RUN apt-get update -y && \
apt-get install build-essential checkinstall -y && \
cd /tmp && \
wget http://www.imagemagick.org/download/ImageMagick-7.0.3-8.tar.gz && \
tar xf ImageMagick-7.0.3-8.tar.gz && \
cd ImageMagick-7.0.3-8 && \
./configure && \
make && \
checkinstall -y && \
make install && \
ldconfig /usr/local/lib
#
# Node.js
#
RUN apt-get update -y && \
apt-get install nodejs npm -y && \
update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10
#
# Bower
#
npm install bower -g
#
# Webpack
#
npm install webpack -g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment