Created
June 13, 2014 15:03
-
-
Save 4n3w/f80446ec3e3aac9083f5 to your computer and use it in GitHub Desktop.
Example Dockerfile for rails
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
FROM ubuntu | |
MAINTAINER Andrew Wood <andrew.d.wood@gmail.com> | |
RUN apt-get update -q | |
RUN apt-get install -qy git curl build-essential libssl-dev sqlite3 libsqlite3-dev nodejs | |
RUN git clone https://github.com/sstephenson/rbenv.git ~/.rbenv | |
RUN git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
RUN echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile | |
RUN echo 'eval "$(rbenv init -)"' >> ~/.bash_profile | |
RUN /bin/bash -c -l 'rbenv install 2.1.0' | |
RUN /bin/bash -c -l 'rbenv global 2.1.0' | |
RUN /bin/bash -c -l 'gem install bundler --no-ri --no-rdoc' | |
ADD . railsdockerapp | |
WORKDIR railsdockerapp | |
RUN /bin/bash -c -l 'bundle install' | |
EXPOSE 80 | |
CMD /bin/bash -c -l 'bundle exec rails server -p 80' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment