$ cp docker-compose.yml.sample docker-compose.yml
Edit docker-compose.yml
according to your needs.
$ cp config/database.yml.sample config/database.yml
$ docker-compose build && docker-compose pull
$ docker-compose run --rm -u root web bash -c "mkdir -p /bundle/vendor && chown ruby /bundle/vendor"
$ docker-compose run --rm web bundle install
$ docker-compose run --rm web bundle exec rake db:create
$ docker-compose run --rm web bundle exec rake db:migrate