Public Repository

Last pushed: 2 years ago
Short Description
Simple rails container
Full Description

Info:

  • Imports adamstrickland/ruby
  • Installs NodeJS, procps, bison
  • Exposes port 3000
  • Sets bundle install --system --without test development && PORT=3000 foreman start as the CMD

To use:

  • In the root of your Rails app, add a Dockerfile and a Procfile
  • Define your runtime processes in the Procfile:

    web: bundle exec rackup -p $PORT

    or something similar

  • In your Dockerfile:

    FROM adamstrickland/rails RUN apt-get install -y libsqlite3-dev sqlite3 # <= change/add dependencies as appropriate ADD . /var/application WORKDIR /var/application

  • From $RAILS_ROOT:

    docker build -t your_app_tag && docker run -p 3000:3000 -d your_app_tag

    This will run bundle install and startup the application according to the Procfile. You should be able to curl it: curl $HOST:3000 | grep Getting

    NOTE: if on OSX using boot2docker (which is what I do), $HOST in will need to reference the boot2docker instance; by default this is 192.168.59.103, not localhost.

Docker Pull Command
Owner
adamstrickland