Skip to content

Instantly share code, notes, and snippets.

@jhsu802701
Last active December 2, 2019 00:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhsu802701/5797fdb8a27ba79c97efcb63223d858b to your computer and use it in GitHub Desktop.
Save jhsu802701/5797fdb8a27ba79c97efcb63223d858b to your computer and use it in GitHub Desktop.
Creating myapp (from the book _Docker For Rails Developers_)
  1. Start the Docker container by entering this command:
docker run -i -t --rm -v ${PWD}:/usr/src/app/ ruby:2.6 bash
  1. Enter these commands in the Docker container:
cd /usr/src/app # Enter the shared directory
gem install rails -v 5.2.4 # Install Rails
rails _5.2.4_ new myapp --skip-test --skip-bundle # Create the new Rails app
  1. Exit the Docker container by entering the command "exit".

  2. Make the myapp app owned by your username instead of root by entering this command:

sudo chown `whoami`:users -R myapp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment