Skip to content

radiorabe/container-image-rabe-s2i-python-minimal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RaBe S2I Python Minimal Image

The RaBe S2I Python Minimal Image resembles a classic sclorg/s2i-python image with the main difference being that it is based on the RaBe UBI8 Minimal Image. It's main use if as a build container for building wheels.

The image is based on the RaBe S2I Base Image and RaBe S2I Core Image which is in turn based on the Red Hat Universal Base Image 8 Minimal container provided by Red Hat via RaBe Universal Base Image 8 Minimal.

Features

  • Based on RaBe Universal Base Image 8 Minimal
  • Contains the latest python and a pip with wheels support
  • Build wheels for installing into RaBe Python Base Image Minimal

Usage

Create a multistage Dockerfile using both s2i-python and python-minimal as bases. Replace latest with exact versions in the following example.

FROM ghcr.io/radiorabe/s2i-python:latest AS build

COPY ./ /opt/app-root/src

RUN python3 setup.py bdist_wheel


FROM gchr.io/radiorabe/python-minimal:latest AS app

COPY --from=build /opt/app-root/src/dist/*.whl /tmp/dist/

RUN    python3 -mpip --no-cache-dir install /tmp/dist/*.whl \
    && rm -rf /tmp/dist/

USER nobody

CMD ["python3", "-mapp"]

Release Management

The CI/CD setup uses semantic commit messages following the conventional commits standard. There is a GitHub Action in .github/workflows/semantic-release.yaml that uses go-semantic-commit to create new releases.

The commit message should be structured as follows:

<type>[optional scope]: <description>

[optional body]

[optional footer(s)]

The commit contains the following structural elements, to communicate intent to the consumers of your library:

  1. fix: a commit of the type fix patches gets released with a PATCH version bump
  2. feat: a commit of the type feat gets released as a MINOR version bump
  3. BREAKING CHANGE: a commit that has a footer BREAKING CHANGE: gets released as a MAJOR version bump
  4. types other than fix: and feat: are allowed and don't trigger a release

If a commit does not contain a conventional commit style message you can fix it during the squash and merge operation on the PR.

Build Process

The CI/CD setup uses the Docker build-push Action to publish container images. This is managed in .github/workflows/release.yaml.

License

This application is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3 of the License.

Copyright

Copyright (c) 2022 Radio Bern RaBe