# Run Ruby in a Docker container For when you really just want to Run The Thing without mucking up your Ruby install with a bunch of gems. In this example, `./generate` runs locally, and `./generate docker` runs in a Docker container that is automatically cleaned up upon completion. ```bash #! /bin/bash if [ "$1" = "docker" ]; then docker run --rm -v .:/app -w /app ruby:latest ./generate else bundle bundle exec ruby ./path/to/the/script.rb fi ```