- Start the Docker container by entering this command:
docker run -i -t --rm -v ${PWD}:/usr/src/app/ ruby:2.6 bash
- 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
-
Exit the Docker container by entering the command "exit".
-
Make the myapp app owned by your username instead of root by entering this command:
sudo chown `whoami`:users -R myapp