Skip to content

Commit

Permalink
adding required files for f35-py310 S2I image to built
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregory-Pereira committed Mar 8, 2022
1 parent 8946641 commit b06d48a
Show file tree
Hide file tree
Showing 5 changed files with 944 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ s2i-thoth

.. |s2i-thoth-f34-py39 on Quay| image:: https://quay.io/repository/thoth-station/s2i-thoth-f34-py39/status

.. |s2i-thoth-f34-py39 on Quay| image:: https://quay.io/repository/thoth-station/s2i-thoth-f35-py310/status

Experimental Thoth container images:

* `quay.io/thoth-station/s2i-thoth-ubi8-py39 <https://quay.io/repository/thoth-station/s2i-thoth-ubi8-py39>`_ |s2i-thoth-ubi8-py39 on Quay|
Expand All @@ -19,6 +21,8 @@ Experimental Thoth container images:

* `quay.io/thoth-station/s2i-thoth-f34-py39 <https://quay.io/repository/thoth-station/s2i-thoth-f34-py39>`_ |s2i-thoth-f34-py39 on Quay|

* `quay.io/thoth-station/s2i-thoth-f35-py310 <https://quay.io/repository/thoth-station/s2i-thoth-f35-py310>`_ |s2i-thoth-f35-py310 on Quay|

Artifacts needed to build `s2i-thoth-*` container images.

These container images are complaint with OpenShift's s2i build process to
Expand Down
46 changes: 46 additions & 0 deletions f35-py310/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Thoth's extension to OpenShift's S2I build
FROM registry.fedoraproject.org/f35/python3:0-41.container

ENV SUMMARY="Thoth's Source-to-Image for Python ${PYTHON_VERSION} applications" \
DESCRIPTION="Thoth's Source-to-Image for Python ${PYTHON_VERSION} applications. This toolchain is based on Fedora 35. It includes Pipenv." \
THOTH_S2I_NAME=quay.io/thoth-station/s2i-thoth-f35-py310 \
THOTH_S2I_VERSION=0.32.3 \
THAMOS_NO_PROGRESSBAR=1 \
THAMOS_NO_EMOJI=1 \
MICROPIPENV_NO_LOCKFILE_PRINT=0 \
MICROPIPENV_NO_LOCKFILE_WRITE=0

LABEL summary="$SUMMARY" \
description="$DESCRIPTION" \
io.k8s.description="$DESCRIPTION" \
io.k8s.display-name="Thoth Python 3.10-f35 S2I" \
io.openshift.expose-services="8080:http" \
io.openshift.tags="python,python310" \
name="$THOTH_S2I_NAME:v$THOTH_S2I_VERSION" \
vendor="AICoE at the Office of the CTO, Red Hat Inc." \
authoritative-source-url="https://quay.io/thoth-station/s2i-thoth" \
version="$THOTH_S2I_VERSION" \
release="0" \
ninja.thoth-station.version="0.7.0-dev" \
maintainer="Thoth Station <[email protected]>"

USER 0
COPY ./s2i_assemble.patch /tmp/s2i_assemble.patch
COPY ./requirements.txt $HOME/requirements.txt
RUN TMPFILE=$(mktemp) && \
TMPFILE_ASSEMBLE=$(mktemp) && \
pushd "${STI_SCRIPTS_PATH}" && patch -p 1 </tmp/s2i_assemble.patch && popd && \
pip3 --no-cache-dir --disable-pip-version-check install -U "pip==20.3.3" && \
/usr/bin/pip3 --no-cache-dir --disable-pip-version-check install -U "pip==20.3.3" && \
curl https://raw.githubusercontent.com/thoth-station/micropipenv/master/micropipenv.py | MICROPIPENV_NO_LOCKFILE_WRITE=1 MICROPIPENV_PIP_BIN=/usr/bin/pip3 /usr/bin/python3 - install -- && \
curl "https://raw.githubusercontent.com/thoth-station/s2i-thoth/master/assemble" -o "${TMPFILE_ASSEMBLE}" && \
cp "${STI_SCRIPTS_PATH}/assemble" "${TMPFILE}" && \
head -n1 "${TMPFILE}" >"${STI_SCRIPTS_PATH}/assemble" && \
cat "${TMPFILE_ASSEMBLE}" >>"${STI_SCRIPTS_PATH}/assemble" && \
tail -n+2 "${TMPFILE}" >>"${STI_SCRIPTS_PATH}/assemble" && \
rm "${TMPFILE}" "${TMPFILE_ASSEMBLE}" /tmp/s2i_assemble.patch requirements.txt && \
sed -i '/ echo "---> Running application from .*/d' "${STI_SCRIPTS_PATH}/run" && \
chown -R 1001:0 ${APP_ROOT} && \
fix-permissions ${APP_ROOT} -P

USER 1001
2 changes: 2 additions & 0 deletions f35-py310/requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
thamos
micropipenv[toml]
Loading

0 comments on commit b06d48a

Please sign in to comment.