openeuler/distroless-rubyThe official distroless-ruby docker image.
Maintained by: openEuler CloudNative SIG.
Where to get help: openEuler CloudNative SIG, openEuler.
This image contains a minimal Linux, ruby runtime.
What is Ruby?
Ruby is a dynamic, reflective, object-oriented, general-purpose, open-source programming language. It supports multiple programming paradigms, including functional, object-oriented, and imperative. It also has a dynamic type system and automatic memory management.
The tag details are as follows
| Tag | Currently | Architectures |
|---|---|---|
| 3.2.2-oe2403lts | Ruby 3.2.2 on openEuler 24.03-LTS | amd64, arm64 |
Create a Dockerfile in your Ruby app project
FROM openeuler/distroless-ruby:3.2.2-oe2403lts RUN bundle config --global frozen 1 WORKDIR /usr/src/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":/usr/src/app -w /usr/src/app openeuler/distroless-ruby:3.2.2-oe2403lts bundle install
Run a single Ruby script
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, for example:
$ docker run -it --rm $PWD/example:/usr/src/myapp -w /usr/src/myapp openeuler/distroless-ruby:3.2.2-oe2403lts ruby example.rb
For implementation details, refer to the distroless-base-nonroot documentation.
If you have any questions or want to use some special features, please submit an issue or a pull request on openeuler-docker-images.


manifest unknown 错误
TLS 证书验证失败
DNS 解析超时
410 错误:版本过低
402 错误:流量耗尽
身份认证失败错误
429 限流错误
凭证保存错误
来自真实用户的反馈,见证轩辕镜像的优质服务