Download and install Docker community edition
Generate a rails app
$ rails new
Update the Gemfile to use gem 'mysql2'
instead of sqlite
Copy the files from here to your project and update project_name
to whatever you'd like.
Start the containers:
$ docker-compose up --build
Create the database:
$ docker-compose run --rm web rake db:create
Visit the website at http://localhost:3000
Start a console within the docker environment:
$ docker-compose run --rm --service-ports web bash
It's also helpful to use kitematic so you can easily see which containers are running, see logs, and stop/remove them.