3.1.2-bullseye | docker pull icr.io/ibmz/ruby@sha256:c5c28b617ab66b97771d6902c9e6ef79816bef1b2006b5a7ed3dec203e061187 | Vulnerability Report | 04-30-2024 | 3.1.0-bullseye | docker pull icr.io/ibmz/ruby@sha256:b1a46aa2e4ad3f6d31fad928673d731ecb86b9a2c7348b5b483906c9112eb124 | Vulnerability Report | 04-30-2024 | 3.1.1-bullseye | docker pull icr.io/ibmz/ruby@sha256:7641cc6f4a08f8a6fc398433db5c6229a8fb6c6207bf58568d7a3321f207dba6 | Vulnerability Report | 04-30-2024 | 2.6 | docker pull icr.io/ibmz/ruby@sha256:285146b90e988f040acde1bc24096f55d45a322bb5040cf3c922ff85dfaed6e9 | Vulnerability Report | 04-30-2024 |
Version | Pull String | Security (IBM Cloud) | Created |
---|---|---|---|
FROM icr.io/ibmz/ruby:[version]
# throw errors if Gemfile has been modified since Gemfile.lock
RUN bundle config --global frozen 1
WORKDIR /usr/src/app
COPY Gemfile Gemfile.lock ./
RUN bundle install
COPY . .
CMD ["ruby", "your-daemon-or-script.rb"]
Put this file in the root of your app, next to the Gemfile.
If you are running Ruby script(s) that do not have or require a Gemfile, you can just get rid of all code in Dockerfile that has anything to do with a 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