-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
SUSE Update Bot
committed
Jan 20, 2025
1 parent
48308c2
commit f4bb5d7
Showing
12 changed files
with
160 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# SPDX-License-Identifier: MIT | ||
|
||
# Copyright (c) 2025 SUSE LLC | ||
|
||
# All modifications and additions to the file contributed by third parties | ||
# remain the property of their copyright owners, unless otherwise agreed | ||
# upon. | ||
|
||
# The content of THIS FILE IS AUTOGENERATED and should not be manually modified. | ||
# It is maintained by the BCI team and generated by | ||
# https://github.com/SUSE/BCI-dockerfile-generator | ||
|
||
# Please submit bugfixes or comments via https://bugs.opensuse.org/ | ||
# You can contact the BCI team via https://github.com/SUSE/bci/discussions | ||
|
||
#!UseOBSRepositories | ||
|
||
#!BuildTag: bci/ruby:3.4-%RELEASE% | ||
#!BuildTag: bci/ruby:3.4 | ||
#!BuildTag: bci/ruby:3 | ||
#!BuildName: bci-ruby-3.4 | ||
#!BuildVersion: 15.7.3.4 | ||
FROM bci/bci-base:15.7 | ||
|
||
RUN set -euo pipefail; \ | ||
zypper -n install --no-recommends ruby3.4 ruby3.4-rubygem-bundler ruby3.4-devel util-linux gcc-c++ sqlite3-devel make timezone curl findutils gawk git-core procps; \ | ||
zypper -n clean; \ | ||
rm -rf {/target,}/var/log/{alternatives.log,lastlog,tallylog,zypper.log,zypp/history,YaST2} | ||
|
||
# Define labels according to https://en.opensuse.org/Building_derived_containers | ||
# labelprefix=com.suse.bci.ruby | ||
LABEL org.opencontainers.image.authors="https://github.com/SUSE/bci/discussions" | ||
LABEL org.opencontainers.image.title="SLE BCI Ruby 3.4" | ||
LABEL org.opencontainers.image.description="Ruby 3.4 container based on the SLE Base Container Image." | ||
LABEL org.opencontainers.image.version="3.4" | ||
LABEL org.opencontainers.image.url="https://www.suse.com/products/base-container-images/" | ||
LABEL org.opencontainers.image.created="%BUILDTIME%" | ||
LABEL org.opencontainers.image.vendor="SUSE LLC" | ||
LABEL org.opencontainers.image.source="%SOURCEURL%" | ||
LABEL org.opencontainers.image.ref.name="3.4-%RELEASE%" | ||
LABEL org.opensuse.reference="registry.suse.com/bci/ruby:3.4-%RELEASE%" | ||
LABEL org.openbuildservice.disturl="%DISTURL%" | ||
LABEL com.suse.supportlevel="techpreview" | ||
LABEL com.suse.eula="sle-bci" | ||
LABEL com.suse.lifecycle-url="https://www.suse.com/lifecycle#suse-linux-enterprise-server-15" | ||
LABEL com.suse.release-stage="beta" | ||
# endlabelprefix | ||
LABEL io.artifacthub.package.readme-url="%SOURCEURL%/README.md" | ||
ENV LANG="C.UTF-8" | ||
ENV RUBY_VERSION="%%rb_ver%%" | ||
ENV RUBY_MAJOR="%%rb_maj%%" | ||
|
||
RUN set -euo pipefail; sed -i 's/--format-executable/--no-format-executable/' /etc/gemrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Ruby 3.4 Container Image | ||
|
||
![Redistributable](https://img.shields.io/badge/Redistributable-Yes-green)![Support Level](https://img.shields.io/badge/Support_Level-techpreview-blue)[![SLSA](https://img.shields.io/badge/SLSA_(v1.0)-Build_L3-Green)](https://documentation.suse.com/sbp/server-linux/html/SBP-SLSA4/) | ||
[![Provenance: Available](https://img.shields.io/badge/Provenance-Available-Green)](https://documentation.suse.com/container/all/html/Container-guide/index.html#container-verify) | ||
|
||
## Description | ||
|
||
[Ruby](https://www.ruby-lang.org/) 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. | ||
|
||
## Usage | ||
|
||
To deploy an application, install dependencies, copy the sources, and configure the application's main script: | ||
|
||
```Dockerfile | ||
FROM registry.suse.com/bci/ruby:3.4 | ||
|
||
# displays an error message if Gemfile and Gemfile.lock are not in sync | ||
RUN bundle config --global frozen 1 | ||
|
||
WORKDIR /app | ||
|
||
COPY Gemfile Gemfile.lock ./ | ||
RUN bundle install | ||
|
||
COPY . . | ||
|
||
CMD [ "ruby", "./main-script.rb" ] | ||
``` | ||
|
||
Build and run the container image: | ||
|
||
```ShellSession | ||
$ podman build -t my-ruby-app . | ||
$ podman run -it --rm my-ruby-app | ||
``` | ||
|
||
The example above assumes that there is a `Gemfile.lock` file in the application directory. | ||
To generate a `Gemfile.lock` file, use the following command: | ||
|
||
```ShellSession | ||
$ podman run --rm -v "$PWD":/app:Z -w /app registry.suse.com/bci/ruby:3.4 bundle lock | ||
``` | ||
|
||
To run a single script inside a container, use the following command: | ||
|
||
```ShellSession | ||
$ podman run --rm -v "$PWD":/app:Z -w /app registry.suse.com/bci/ruby:3.4 ruby script.rb | ||
``` | ||
|
||
## Encoding | ||
|
||
The Ruby image sets the locale environment variable `LANG` to `C.UTF-8`. | ||
|
||
## Additional tools | ||
|
||
In addition to the standard SLE BCI development packages the following | ||
additional tools are included in the image: | ||
|
||
- gcc-c++ | ||
- make | ||
- sqlite3-devel | ||
- timezone | ||
|
||
## Licensing | ||
|
||
`SPDX-License-Identifier: MIT` | ||
|
||
This documentation and the build recipe are licensed as MIT. | ||
The container itself contains various software components under various open source licenses listed in the associated | ||
Software Bill of Materials (SBOM). | ||
|
||
This image is a tech preview. Do not use it for production. | ||
Your feedback is welcome. | ||
Please report any issues to the [SUSE Bugzilla](https://bugzilla.suse.com/enter_bug.cgi?product=SUSE%20Linux%20Enterprise%20Base%20Container%20Images). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<constraints> | ||
<hardware> | ||
<disk> | ||
<size unit="G">6</size> | ||
</disk> | ||
</hardware> | ||
</constraints> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<services> | ||
<service mode="buildtime" name="docker_label_helper"/> | ||
<service mode="buildtime" name="kiwi_metainfo_helper"/> | ||
<service mode="buildtime" name="replace_using_package_version"> | ||
<param name="file">Dockerfile</param> | ||
<param name="regex">%%rb_ver%%</param> | ||
<param name="package">ruby3.4</param> | ||
</service> | ||
<service mode="buildtime" name="replace_using_package_version"> | ||
<param name="file">Dockerfile</param> | ||
<param name="regex">%%rb_maj%%</param> | ||
<param name="package">ruby3.4</param> | ||
<param name="parse-version">minor</param> | ||
</service> | ||
</services> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
------------------------------------------------------------------- | ||
Mon Jan 20 12:46:22 UTC 2025 - SUSE Update Bot <bci-internal@suse.de> | ||
|
||
- First version of the Ruby 3.4 BCI |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.