Skip to content

Instantly share code, notes, and snippets.

@binaryphile
Last active August 29, 2015 14:02
Show Gist options
  • Select an option

  • Save binaryphile/4cd11198302bf3995052 to your computer and use it in GitHub Desktop.

Select an option

Save binaryphile/4cd11198302bf3995052 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
if [ -e .env ]; then
source .env
fi
: ${RI_VERSION?"need to set ruby-install version RI_VERSION, see README.md"}
: ${ROOT=/root}
: ${IMAGE=ubuntu:precise}
: ${RI_PATH=ruby-install-$RI_VERSION}
: ${RI_URL=https://codeload.github.com/postmodern/ruby-install/tar.gz/v$RI_VERSION}
: ${OPTIONS="-i -t -w $ROOT -v $(pwd):$ROOT -e HOME=$ROOT -e ROOT=$ROOT"}
: ${CMD=$ROOT/install.sh}
if [ ! -d $RI_PATH ]; then
curl $RI_URL | tar -xzvf -
fi
docker run $OPTIONS $IMAGE $CMD
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libalgorithm-merge-perl : Depends: perl but it is not going to be installed
Depends: libalgorithm-diff-perl but it is not going to be installed
libc6-dev : Depends: libc6 (= 2.15-0ubuntu10) but 2.15-0ubuntu10.5 is to be installed
libdpkg-perl : Depends: perl but it is not going to be installed
Depends: libtimedate-perl but it is not going to be installed
liberror-perl : Depends: perl (>= 5.6.0-16) but it is not going to be installed
perl-modules : Depends: perl (>= 5.14.2-1) but it is not going to be installed
Depends: libswitch-perl but it is not going to be installed
#!/usr/bin/env bash
if [ -e .env ]; then
source .env
fi
: ${RUBY_VERSION?"need to set ruby version RUBY_VERSION, see README.md"}
: ${RI_VERSION?"need to set ruby-install version RI_VERSION, see README.md"}
: ${ROOT=/root}
: ${SOURCE_LIST="-o Dir::Etc::SourceList=$ROOT/sources.list"}
export DEBIAN_FRONTEND=noninteractive
apt-get $SOURCE_LIST update
apt-get $SOURCE_LIST install -y git build-essential curl libc6-dev g++ dpkg-dev perl-modules liberror-perl libdpkg-perl libalgorithm-merge-perl
apt-get clean
cd $ROOT/ruby-install-$RI_VERSION
make install
ruby-install -s $ROOT/src -i /usr/local/ ruby $RUBY_VERSION
gem update --system
gem install -f bundler rake
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment