Create new Rails app through Docker

Prerequisites Link to heading

Install Docker Here.

Shell Link to heading

You need the bigger Debian based docker image for installing Rails as it needs to have gcc and make for building naitve extensions.

docker-here ruby:3.3.0 bash

Rails Link to heading

gem install -N rails

New Link to heading

rails new "name-me"     \
  --skip-bundle         \
  --skip-docker         \
  --skip-jbuilder       \
  --database=postgresql \
  --javascript=esbuild  \
  --css=tailwind

Once this is done you can Ctrl-C to exit the docker shell.

Git Link to heading

git status

git init
git commit -m 'Initial commit' --allow-empty

git add .
git commit -m 'Rails New'

Assets Link to heading

bundle exec rails javascript:install:esbuild
bundle exec rails css:install:tailwind

Next Steps Link to heading

Continue the setup using templates from Docker Projects.