Created
November 20, 2021 16:52
-
-
Save RyanSnodgrass/4d5ac33ca2bbfccf29f9a0e9457670a7 to your computer and use it in GitHub Desktop.
My Ruby on Rails starter template. Use this to generate a new Rails app
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
FROM ruby:3.0 | |
# Add nodejs to apt package manager | |
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - | |
# Install nodejs | |
RUN apt-get install -y nodejs | |
# Install Yarn | |
RUN npm install --global yarn | |
# Install rails and accompanying gems | |
RUN gem install rails | |
WORKDIR /app | |
# After the image is built run these next commands: | |
# docker run -v "$(pwd)"/.:/app --rm -it <app_name> rails new <app_name> . | |
# | |
# The new rails app is in the newly created subdirectory. Copy its contents where you please. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Recommended to put this in the parent directory and let this docker image build your rails app folder with contents