Zero to Up and Running Ruby Project (Short Version)
tl;dr
$ git clone https://gist.github.com/ff2633acfffcba1bef593bdfade4d557.git my-blog
$ cd my-blog
$ vim Gemfile # Edit Gemfile!
$ ./setup
$ docker-compose run --rm app bundle exec rails new . --force
This is a short version of Zero to Up and Running a Rails Project only using Docker I published in Codeminer’s blog.
Git clone this gist:
$ git clone https://gist.github.com/ff2633acfffcba1bef593bdfade4d557.git my-blog
Edit Gemfile to look like:
source "https://rubygems.org"
gem "rails"
# gem "sinatra" # Or uncomment this line
Build:
$ docker-compose build && docker-compose pull
To install ruby dependencies in docker run:
$ docker-compose run --rm -u root app bash -c "mkdir -p /bundle/vendor && chown ruby /bundle/vendor"
$ docker-compose run --rm app bundle install
If you are willing to create a Ruby on Rails project run these two commands:
$ docker-compose run --rm app bundle exec rails new . --force