This repository has been archived by the owner on Mar 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from promptworks/refactor-to-script
Move install code to external script
- Loading branch information
Showing
2 changed files
with
25 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,8 @@ | ||
FROM centos | ||
MAINTAINER PromptWorks <team@promptworks.com> | ||
|
||
RUN export RUBY_INSTALL_VERSION=0.4.0 && \ | ||
export RUBY_VERSION=2.0.0-p451 && \ | ||
cd /tmp && \ | ||
yum list installed | cut -f 1 -d " " | uniq | sort > /tmp/pre && \ | ||
yum install git -y && \ | ||
wget -O ruby-install-$RUBY_INSTALL_VERSION.tar.gz \ | ||
https://github.com/postmodern/ruby-install/archive/v$RUBY_INSTALL_VERSION.tar.gz && \ | ||
tar -xzf ruby-install-$RUBY_INSTALL_VERSION.tar.gz && \ | ||
cd ruby-install-$RUBY_INSTALL_VERSION && \ | ||
make install && \ | ||
ruby-install -i /usr/local ruby $RUBY_VERSION && \ | ||
make uninstall && \ | ||
yum list installed | cut -f 1 -d " " | uniq | sort > /tmp/post && \ | ||
diff /tmp/pre /tmp/post | grep "^>" | cut -f 2 -d ' ' | \ | ||
xargs echo yum erase -y && \ | ||
yum clean all && \ | ||
rm -rf /usr/local/src/ruby* && \ | ||
rm -rf /tmp/* | ||
ADD install_ruby.sh /tmp/ | ||
RUN /tmp/install_ruby.sh | ||
|
||
RUN gem update --system --no-document | ||
RUN gem install bundler --no-ri --no-rdoc |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash -ex | ||
|
||
export RUBY_INSTALL_VERSION=0.4.0 | ||
export RUBY_VERSION=2.0.0-p451 | ||
|
||
cd /tmp | ||
|
||
yum list installed | cut -f 1 -d " " | uniq | sort > /tmp/pre | ||
yum install git -y | ||
|
||
wget -O ruby-install-$RUBY_INSTALL_VERSION.tar.gz \ | ||
https://github.com/postmodern/ruby-install/archive/v$RUBY_INSTALL_VERSION.tar.gz | ||
tar -xzf ruby-install-$RUBY_INSTALL_VERSION.tar.gz | ||
cd ruby-install-$RUBY_INSTALL_VERSION | ||
make install | ||
ruby-install -i /usr/local ruby $RUBY_VERSION | ||
|
||
make uninstall | ||
yum list installed | cut -f 1 -d " " | uniq | sort > /tmp/post | ||
diff /tmp/pre /tmp/post | grep "^>" | cut -f 2 -d ' ' | xargs echo yum erase -y | ||
yum clean all | ||
rm -rf /usr/local/src/ruby* | ||
rm -rf /tmp/* |