Ruby is a dynamic, reflective, object-oriented, general-purpose, open-source programming language.
4.0K
The armhf organization is deprecated in favor of the more-specific arm32v7 and arm32v6 organizations, as per https://github.com/docker-library/official-images#architectures-other-than-amd64. Please adjust your usages accordingly.
Dockerfile links** THESE IMAGES ARE VERY EXPERIMENTAL; THEY ARE PROVIDED ON A BEST-EFFORT BASIS WHILE docker-library/official-images#2289 IS STILL IN-PROGRESS (which is the first step towards proper multiarch images) **
** PLEASE DO NOT USE THEM FOR IMPORTANT THINGS **
This image is built from the source of the official image of the same name (ruby). Please see that image's description for links to the relevant Dockerfiles.
If you are curious about specifically how this image differs, see the Jenkins Groovy DSL scripts in the tianon/jenkins-groovy GitHub repository, which are responsible for creating the Jenkins jobs which build them.
Where to get help:
the Docker Community Forums, the Docker Community Slack, or Stack Overflow
Where to file issues:
https://github.com/docker-library/ruby/issues
Maintained by:
the Docker Community
Published image artifact details:
repo-info repo's repos/ruby/ directory (history)
(image metadata, transfer size, etc)
Image updates:
official-images PRs with label library/ruby
official-images repo's library/ruby file (history)
Source of this description:
docs repo's ruby/ directory (history)
Supported Docker versions:
the latest release (down to 1.6 on a best-effort basis)
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.

Dockerfile in your Ruby app projectFROM ruby:2.1-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 which should be all you need to bootstrap most applications. The build will COPY . /usr/src/app and RUN bundle install.
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
Gemfile.lockThe onbuild tag expects a Gemfile.lock in your app directory. This docker run will help you generate one. Run it in the root of your app, next to the Gemfile:
$ docker run --rm -v "$PWD":/usr/src/app -w /usr/src/app ruby:2.1 bundle install
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 ruby your-daemon-or-script.rb
By default, Ruby inherits the locale of the environment in which it is run. For most users running Ruby on their desktop systems, that means it's likely using some variation of *.UTF-8 (en_US.UTF-8, etc). In Docker however, the default locale is C, which can have unexpected results. If your application needs to interact with UTF-8, it is recommended that you explicitly adjust the locale of your image/container via -e LANG=C.UTF-8 or ENV LANG C.UTF-8.
View license information for the software contained in this image.
No tags have been pushed to this repository yet.