Public | Automated Build

Last pushed: 2 years ago
Short Description
Simple ruby on rails development container.
Full Description

Demo Ruby on Rails application

How to setup a complete Rails setup on Docker.


So need to install the following softwares:

  • git
  • Docker
  • docker-compose

Or grab yourself the Docker toolbox

This repository

Grab it.

$ git clone ror
$ cd ror


Now, the funny part that creates and starts the containers.

# if you uncomment the docker-composer.yml
$ docker-compose build
# otherwise:
$ docker build -t greut/rails -f build/Dockerfile .
$ docker-compose up -d
$ docker-compose logs web

Entering the container

We will work from the container called web. Docker-compose puts a prefix
to it (the name of the directory) and a suffix, a counter. Hence, our web
container is identified by ror_web_1.

$ docker-compose web /bin/sh
/ mv /etc/profile.d/color_prompt /etc/profile.d/
/ # su ruby
/ $ . /etc/profile
/ $ export PATH = $BUNDLE_BIN:$PATH
$ ruby@ror:/# cd /usr/src/app
$ ruby@ror:/usr/src/app$ rails -v
$ bundle install
$ rails db:create db:migrate db:seed
$ foreman start
Docker Pull Command
Source Repository