Skip to content

Instantly share code, notes, and snippets.

@RyanSnodgrass
Created November 20, 2021 16:52
Show Gist options
  • Save RyanSnodgrass/4d5ac33ca2bbfccf29f9a0e9457670a7 to your computer and use it in GitHub Desktop.
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
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.
@RyanSnodgrass
Copy link
Author

Recommended to put this in the parent directory and let this docker image build your rails app folder with contents

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment