Skip to content

Commit 7870ad5

Browse files
authored
Merge pull request #212 from harshad16/fix-ubi8-py39
Fix up the assemble script with the s2i-assemble
2 parents 08ea395 + 432c764 commit 7870ad5

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

f34-py39/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FROM registry.fedoraproject.org/f34/python3:latest
44
ENV SUMMARY="Thoth's Source-to-Image for Python ${PYTHON_VERSION} applications" \
55
DESCRIPTION="Thoth's Source-to-Image for Python ${PYTHON_VERSION} applications. This toolchain is based on Fedora 34. It includes Pipenv." \
66
THOTH_S2I_NAME=quay.io/thoth-station/s2i-thoth-f34-py39 \
7-
THOTH_S2I_VERSION=0.31.0 \
7+
THOTH_S2I_VERSION=0.31.1 \
88
THAMOS_NO_PROGRESSBAR=1 \
99
THAMOS_NO_EMOJI=1 \
1010
MICROPIPENV_NO_LOCKFILE_PRINT=0 \

ubi8-py36/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FROM registry.access.redhat.com/ubi8/python-36:1-148
44
ENV SUMMARY="Thoth's Source-to-Image for Python ${PYTHON_VERSION} applications" \
55
DESCRIPTION="Thoth's Source-to-Image for Python ${PYTHON_VERSION} applications. This toolchain is based on Red Hat UBI8. It includes pipenv." \
66
THOTH_S2I_NAME=quay.io/thoth-station/s2i-thoth-ubi8-py36 \
7-
THOTH_S2I_VERSION=0.31.0 \
7+
THOTH_S2I_VERSION=0.31.1 \
88
THAMOS_NO_PROGRESSBAR=1 \
99
THAMOS_NO_EMOJI=1 \
1010
MICROPIPENV_NO_LOCKFILE_PRINT=0 \

ubi8-py38/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FROM registry.access.redhat.com/ubi8/python-38:1-60
44
ENV SUMMARY="Thoth's Source-to-Image for Python ${PYTHON_VERSION} applications" \
55
DESCRIPTION="Thoth's Source-to-Image for Python ${PYTHON_VERSION} applications. This toolchain is based on Red Hat UBI8. It includes pipenv." \
66
THOTH_S2I_NAME=quay.io/thoth-station/s2i-thoth-ubi8-py38 \
7-
THOTH_S2I_VERSION=0.31.0 \
7+
THOTH_S2I_VERSION=0.31.1 \
88
THAMOS_NO_PROGRESSBAR=1 \
99
THAMOS_NO_EMOJI=1 \
1010
MICROPIPENV_NO_LOCKFILE_PRINT=0 \

ubi8-py39/Dockerfile

+13-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FROM registry.access.redhat.com/ubi8/python-39:1-10
44
ENV SUMMARY="Thoth's Source-to-Image for Python ${PYTHON_VERSION} applications" \
55
DESCRIPTION="Thoth's Source-to-Image for Python ${PYTHON_VERSION} applications. This toolchain is based on Red Hat UBI8. It includes pipenv." \
66
THOTH_S2I_NAME=quay.io/thoth-station/s2i-thoth-ubi8-py39 \
7-
THOTH_S2I_VERSION=0.31.0 \
7+
THOTH_S2I_VERSION=0.31.1 \
88
THAMOS_NO_PROGRESSBAR=1 \
99
THAMOS_NO_EMOJI=1 \
1010
MICROPIPENV_NO_LOCKFILE_PRINT=0 \
@@ -26,12 +26,20 @@ LABEL summary="$SUMMARY" \
2626

2727
USER 0
2828
COPY ./s2i_assemble.patch /tmp/s2i_assemble.patch
29-
COPY ./requirements.txt /tmp/requirements.txt
30-
RUN pushd "${STI_SCRIPTS_PATH}" && patch -p 1 </tmp/s2i_assemble.patch && popd && \
29+
COPY ./requirements.txt $HOME/requirements.txt
30+
RUN TMPFILE=$(mktemp) && \
31+
TMPFILE_ASSEMBLE=$(mktemp) && \
32+
pushd "${STI_SCRIPTS_PATH}" && patch -p 1 </tmp/s2i_assemble.patch && popd && \
3133
pip3 install -U "pip==21.1.3" && \
3234
/usr/bin/pip3 install -U "pip==21.1.3" && \
33-
/usr/bin/pip3 install -U "micropipenv" && \
34-
pushd /tmp && MICROPIPENV_NO_LOCKFILE_WRITE=1 MICROPIPENV_PIP_BIN=/usr/bin/pip3 micropipenv install && popd && \
35+
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 -- && \
36+
curl "https://raw.githubusercontent.com/thoth-station/s2i-thoth/master/assemble" -o "${TMPFILE_ASSEMBLE}" && \
37+
cp "${STI_SCRIPTS_PATH}/assemble" "${TMPFILE}" && \
38+
head -n1 "${TMPFILE}" >"${STI_SCRIPTS_PATH}/assemble" && \
39+
cat "${TMPFILE_ASSEMBLE}" >>"${STI_SCRIPTS_PATH}/assemble" && \
40+
tail -n+2 "${TMPFILE}" >>"${STI_SCRIPTS_PATH}/assemble" && \
41+
rm "${TMPFILE}" "${TMPFILE_ASSEMBLE}" /tmp/s2i_assemble.patch requirements.txt && \
42+
sed -i '/ echo "---> Running application from .*/d' "${STI_SCRIPTS_PATH}/run" && \
3543
chown -R 1001:0 ${APP_ROOT} && \
3644
fix-permissions ${APP_ROOT} -P && \
3745
yum update --assumeyes --nobest --setopt=tsflags=nodocs

0 commit comments

Comments
 (0)