Skip to content

Instantly share code, notes, and snippets.

@enzodiaz25
Created June 21, 2024 18:42
Show Gist options
  • Select an option

  • Save enzodiaz25/0d048a7bc867eeab61391ae88e7874ab to your computer and use it in GitHub Desktop.

Select an option

Save enzodiaz25/0d048a7bc867eeab61391ae88e7874ab to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment