Skip to content

Instantly share code, notes, and snippets.

@curtis1000
Last active September 29, 2017 02:26
Show Gist options
  • Save curtis1000/6a5f22cb727671514ce5cf8362146a43 to your computer and use it in GitHub Desktop.
Save curtis1000/6a5f22cb727671514ce5cf8362146a43 to your computer and use it in GitHub Desktop.
Docker Ruby Env

One-liner to run a ruby script with docker

docker run -it --rm --name my-running-script -v "$PWD":/usr/src/myapp -w /usr/src/myapp ruby:latest ruby ./version.rb

Note that the command supplied to the image is everything after the image name "ruby:latest" in the example above.

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