-
-
Save tamadamas/1eacc6d943fdfa7f5ed290bedfb03d64 to your computer and use it in GitHub Desktop.
Create new rails project by docker one off ruby container
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Start a new, one-off ruby container running a bash shell. It should have the | |
# current directory mounted at '/usr/src': | |
docker run --rm -ti -v $(pwd):/usr/src -w /usr/src ruby:2.2.6 bash | |
# Now that your'e running bash inside our one-off container, install rails and generate the app. | |
gem install rails --no-rdoc --no-ri && rails new my-app --database=postgresql | |
# Exit the one-off container. The container should be removed automatically. | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment