Created
January 6, 2014 21:04
-
-
Save tristanoneil/8289800 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| FROM ubuntu:precise | |
| ENV DEBIAN_FRONTEND noninteractive | |
| RUN apt-get -y update | |
| RUN apt-get -y install git build-essential python-software-properties automake curl | |
| # Install RVM | |
| RUN curl -L https://get.rvm.io | bash -s stable | |
| # Install Ruby and any requirements | |
| RUN /bin/bash -l -c "rvm requirements" | |
| RUN /bin/bash -l -c "rvm install 2.0.0" | |
| RUN /bin/bash -l -c "rvm use 2.0.0 --default" | |
| RUN /bin/bash -l -c "gem install bundler" | |
| # Install node.js | |
| RUN add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe" | |
| RUN add-apt-repository ppa:richarvey/nodejs | |
| RUN apt-get -y update | |
| RUN apt-get -y install nodejs | |
| # Clone app repo | |
| VOLUME "/var/www" | |
| RUN cd /var/www/ && git clone https://github.com/tristanoneil/smple.git | |
| RUN cd /var/www/smple && /bin/bash -l -c "bundle install" | |
| # Install Nginx and Passenger | |
| RUN gpg --keyserver keyserver.ubuntu.com --recv-keys 561F9B9CAC40B2F7 | |
| RUN gpg --armor --export 561F9B9CAC40B2F7 | apt-key add - | |
| RUN apt-get install apt-transport-https | |
| RUN sh -c "echo 'deb https://oss-binaries.phusionpassenger.com/apt/passenger precise main' >> /etc/apt/sources.list.d/passenger.list" | |
| RUN apt-get -y update | |
| RUN apt-get -y install nginx-full passenger | |
| EXPOSE 80 | |
| CMD service nginx start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment