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.