Created
May 31, 2015 04:58
-
-
Save alex-nexus/370dc6b2a3ae442f13cb to your computer and use it in GitHub Desktop.
sample Dockerfile
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 ruby:2.2.2 | |
| ################################# | |
| # native libs | |
| ################################# | |
| RUN apt-get update -qq && apt-get install -y build-essential | |
| # for postgres | |
| RUN apt-get install -y libpq-dev | |
| # RUN apt-get install -y postgresql | |
| # for nokogiri | |
| RUN apt-get install -y libxml2-dev libxslt1-dev | |
| # for capybara-webkit | |
| RUN apt-get install -y libqt4-webkit libqt4-dev xvfb | |
| RUN apt-get install imagemagick libmagickwand-dev | |
| # for a JS runtime | |
| RUN apt-get install -y nodejs | |
| RUN apt-get install -y nginx zip curl | |
| ################################# | |
| # Install Nginx. | |
| ################################# | |
| RUN echo "daemon off;" >> /etc/nginx/nginx.conf | |
| # RUN curl -o /usr/share/nginx/www/master.zip -L https://codeload.github.com/gabrielecirulli/2048/zip/master | |
| # RUN cd /usr/share/nginx/www/ && unzip master.zip && mv 2048-master/* . && rm -rf 2048-master master.zip | |
| EXPOSE 80 | |
| CMD ["/usr/sbin/nginx", "-c", "/etc/nginx/nginx.conf"] | |
| ################################# | |
| # Rails | |
| ################################# | |
| ENV APP_HOME /givebox | |
| RUN mkdir -p $APP_HOME | |
| WORKDIR $APP_HOME | |
| #RUN RAILS_ENV=production bundle exec rake assets:precompile | |
| ADD Gemfile* $APP_HOME/ | |
| RUN bundle install | |
| ADD . $APP_HOME | |
| # RUN RAILS_ENV=production bundle exec rake db:migrate | |
| # CMD RAILS_ENV=production foreman start -f Procfile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment