Skip to content

Edits and revisions to README-content.md and README-short.txt #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions ruby/README-content.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,35 @@
# What is Ruby?

Ruby is a dynamic, reflective, object-oriented, general-purpose programming language. It was designed and developed in the mid-1990s by Yukihiro "Matz" Matsumoto in Japan.

According to its authors, Ruby was influenced by Perl, Smalltalk, Eiffel, Ada, and Lisp. It supports multiple programming paradigms, including functional, object-oriented, and imperative. It also has a dynamic type system and automatic memory management.
Ruby is a dynamic, reflective, object-oriented, general-purpose, open-source programming
language.
According to its authors, Ruby was influenced by Perl, Smalltalk, Eiffel, Ada, and Lisp.
It supports multiple programming paradigms, including functional, object-oriented, and
imperative. It also has a dynamic type system and automatic memory management.

> [wikipedia.org/wiki/Ruby_(programming_language)](https://en.wikipedia.org/wiki/Ruby_(programming_language))

# How to use this image

## Create a `Dockerfile` in your ruby app project
## Create a `Dockerfile` in your Ruby app project

FROM ruby:2.1.2-onbuild
CMD ["./your-daemon-or-script.rb"]

Put this file in the root of your app, next to the `Gemfile`.

This image includes multiple `ONBUILD` triggers so that should be all that you need to bootstrap most applications. The build will `COPY . /usr/src/app` and `RUN bundle install`.
This image includes multiple `ONBUILD` triggers which should be all you need to
bootstrap most applications. The build will `COPY . /usr/src/app` and `RUN bundle
install`.

Then build and run the ruby image.
You can then build and run the Ruby image.

docker build -t my-ruby-app .
docker run -it --name my-running-script my-ruby-app

## Run a single ruby script
## Run a single Ruby script

For many single file projects, it may not be convenient to write a `Dockerfile` for your project. In such cases, you can run a ruby script by using the ruby docker image directly.
For many simple, single file projects, you may find it inconvenient to write a complete
`Dockerfile`. In such cases, you can run a Ruby script by using the Ruby Docker image
directly.

docker run -it --rm --name my-running-script -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp ruby:2.1.2 ruby your-daemon-or-script.rb
4 changes: 3 additions & 1 deletion ruby/README-short.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
Ruby is a dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write.
Ruby is a dynamic, reflective, object-oriented, general-purpose, open-source programming
language. It supports multiple programming paradigms, including functional,
object-oriented, and imperative.