Updated images for Ruby open-source programming language.
2.2K
This image is based on the official Ruby image for Docker. This image has been updated with the official repository packages to the latest available version. Also, the current Node.js LTS version has been added and the latest stable version for Yarn.
FROM speedyrails/ruby:2.4.0
# throw errors if Gemfile has been modified since Gemfile.lock
RUN bundle config --global frozen 1
WORKDIR /app
COPY Gemfile Gemfile.lock ./
RUN bundle install
COPY . .
CMD ["./your-daemon-or-script.rb"]
Put this file in the root of your app, next to the Gemfile.
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
Generate a Gemfile.lock
The above example Dockerfile 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":/app -w /app speedyrails/ruby:2.4.0 bundle install
Content type
Image
Digest
Size
400.9 MB
Last updated
over 4 years ago
docker pull speedyrails/ruby:2.6.10