Skip to content

Commit

Permalink
Test build for #2203
Browse files Browse the repository at this point in the history
  • Loading branch information
SUSE Update Bot committed Jan 20, 2025
1 parent 48308c2 commit f4bb5d7
Show file tree
Hide file tree
Showing 12 changed files with 160 additions and 199 deletions.
14 changes: 7 additions & 7 deletions .obs/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ staging_build:
source_project: home:defolos:BCI:CR:SLE-15-SP7
source_package: ruby-2.5-image
target_project: home:defolos:BCI:CR:SLE-15-SP7:Staging
- branch_package:
source_project: home:defolos:BCI:CR:SLE-15-SP7
source_package: ruby-3.4-image
target_project: home:defolos:BCI:CR:SLE-15-SP7:Staging
- branch_package:
source_project: home:defolos:BCI:CR:SLE-15-SP7
source_package: rust-oldstable-image
Expand All @@ -205,10 +209,6 @@ staging_build:
source_project: home:defolos:BCI:CR:SLE-15-SP7
source_package: spack-image
target_project: home:defolos:BCI:CR:SLE-15-SP7:Staging
- branch_package:
source_project: home:defolos:BCI:CR:SLE-15-SP7
source_package: stunnel-image
target_project: home:defolos:BCI:CR:SLE-15-SP7:Staging
filters:
event: pull_request

Expand Down Expand Up @@ -364,6 +364,9 @@ refresh_devel_BCI:
- trigger_services:
project: devel:BCI:SLE-15-SP7
package: ruby-2.5-image
- trigger_services:
project: devel:BCI:SLE-15-SP7
package: ruby-3.4-image
- trigger_services:
project: devel:BCI:SLE-15-SP7
package: rust-oldstable-image
Expand All @@ -379,9 +382,6 @@ refresh_devel_BCI:
- trigger_services:
project: devel:BCI:SLE-15-SP7
package: spack-image
- trigger_services:
project: devel:BCI:SLE-15-SP7
package: stunnel-image
filters:
event: push
branches:
Expand Down
53 changes: 53 additions & 0 deletions ruby-3.4-image/Dockerfile
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
74 changes: 74 additions & 0 deletions ruby-3.4-image/README.md
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).
7 changes: 7 additions & 0 deletions ruby-3.4-image/_constraints
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>
15 changes: 15 additions & 0 deletions ruby-3.4-image/_service
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>
4 changes: 4 additions & 0 deletions ruby-3.4-image/ruby-3.4-image.changes
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
62 changes: 0 additions & 62 deletions stunnel-image/Dockerfile

This file was deleted.

91 changes: 0 additions & 91 deletions stunnel-image/README.md

This file was deleted.

9 changes: 0 additions & 9 deletions stunnel-image/_service

This file was deleted.

24 changes: 0 additions & 24 deletions stunnel-image/entrypoint.sh

This file was deleted.

4 changes: 0 additions & 4 deletions stunnel-image/stunnel-image.changes

This file was deleted.

2 changes: 0 additions & 2 deletions stunnel-image/stunnel.conf

This file was deleted.

0 comments on commit f4bb5d7

Please sign in to comment.