Skip to content

Instantly share code, notes, and snippets.

View enzodiaz25's full-sized avatar

Enzo Diaz enzodiaz25

View GitHub Profile
@enzodiaz25
enzodiaz25 / initialize_rails_app_with_docker.md
Created June 21, 2024 18:42
Create Rails app in current dir. with a docker one-liner
export APP_NAME="something"

docker run -v "$PWD:/app" -w "/app" -e APP_NAME --entrypoint="/bin/bash" --rm ruby:3.3.0-slim -c 'apt-get update -qq && apt-get install -y git build-essential && gem install rails && rails new $APP_NAME'
  • Ruby version: 3.3.0 (slim image)
    • You can pick another version or image from the Ruby Docker Hub page