-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1912 from SUSE/for-deploy-7
🤖: Update build recipes for SP7
- Loading branch information
Showing
5 changed files
with
136 additions
and
0 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,57 @@ | ||
# SPDX-License-Identifier: MIT | ||
|
||
# Copyright (c) 2024 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/python:%%py313_ver%%-%RELEASE% | ||
#!BuildTag: bci/python:%%py313_ver%% | ||
#!BuildTag: bci/python:3.13-%RELEASE% | ||
#!BuildTag: bci/python:3.13 | ||
#!BuildTag: bci/python:3 | ||
#!BuildName: bci-python-3.13 | ||
#!BuildVersion: 15.7.3.13 | ||
FROM bci/bci-base:15.7 | ||
|
||
RUN set -euo pipefail; \ | ||
zypper -n install --no-recommends python313-devel python313 python313-pip curl findutils gawk git-core procps python313-wheel python313-pipx lifecycle-data-sle-module-development-tools; \ | ||
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.python | ||
LABEL org.opencontainers.image.authors="SUSE LLC (https://www.suse.com/)" | ||
LABEL org.opencontainers.image.title="SLE BCI Python 3.13 development" | ||
LABEL org.opencontainers.image.description="Python 3.13 development container based on the SLE Base Container Image." | ||
LABEL org.opencontainers.image.version="%%py313_ver%%" | ||
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="%%py313_ver%%-%RELEASE%" | ||
LABEL org.opensuse.reference="registry.suse.com/bci/python:%%py313_ver%%-%RELEASE%" | ||
LABEL org.openbuildservice.disturl="%DISTURL%" | ||
LABEL com.suse.supportlevel="techpreview" | ||
LABEL com.suse.supportlevel.until="2031-07-31" | ||
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 PYTHON_VERSION="%%py313_ver%%" | ||
ENV PATH="$PATH:/root/.local/bin" | ||
ENV PIP_VERSION="%%pip_ver%%" | ||
|
||
RUN set -euo pipefail; install -d -m 0755 /root/.local/bin; ln -s /usr/bin/python3.13 /usr/local/bin/python3; \ | ||
ln -s /usr/bin/pydoc3.13 /usr/local/bin/pydoc |
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,54 @@ | ||
# Python 3.13 development 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 | ||
|
||
[Python](https://www.python.org/) is an interpreted, interactive, object-oriented, open-source programming language. It incorporates modules, exceptions, dynamic typing, high-level dynamic data types, and classes. It provides interfaces to many system calls, libraries, and various window systems, and it is extensible in C or C++. It is also usable as an extension language for applications that require programmable interfaces. | ||
|
||
## Usage | ||
|
||
To deploy an application, install dependencies, copy the sources, and configure the application's main script: | ||
|
||
```Dockerfile | ||
FROM registry.suse.com/bci/python:3.13 | ||
|
||
WORKDIR /app | ||
|
||
COPY requirements.txt ./ | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
COPY . . | ||
|
||
CMD [ "python3", "./main-script.py" ] | ||
``` | ||
|
||
Build and run the container image: | ||
|
||
```ShellSession | ||
$ podman build -t my-python-app . | ||
$ podman run -it --rm my-python-app | ||
``` | ||
|
||
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/python:3.13 python3 script.py | ||
``` | ||
|
||
## Additional tools | ||
|
||
The Python container image includes [pip](https://pip.pypa.io/), [pipx](https://pipx.pypa.io/), [wheel](https://wheel.readthedocs.io/), Python Development Headers, and Git. | ||
|
||
## 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,14 @@ | ||
<services> | ||
<service mode="buildtime" name="docker_label_helper"/> | ||
<service mode="buildtime" name="kiwi_metainfo_helper"/> | ||
<service name="replace_using_package_version" mode="buildtime"> | ||
<param name="file">Dockerfile</param> | ||
<param name="regex">%%py313_ver%%</param> | ||
<param name="package">python313-base</param> | ||
</service> | ||
<service name="replace_using_package_version" mode="buildtime"> | ||
<param name="file">Dockerfile</param> | ||
<param name="regex">%%pip_ver%%</param> | ||
<param name="package">python313-pip</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 @@ | ||
------------------------------------------------------------------- | ||
Tue Oct 29 09:09:16 UTC 2024 - SUSE Update Bot <[email protected]> | ||
|
||
- First version of the Python 3.13 development %%py313_ver%% BCI |