Skip to content

Commit 50364de

Browse files
committed
feat(Containers): webui: switch to virtualenv for j2 installation
Issue: #458
1 parent adc70ad commit 50364de

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

webui/Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ RUN dnf -y update && \
1717
dnf -y module reset nodejs && \
1818
dnf -y module enable nodejs:20 && \
1919
dnf -y module install nodejs:20/common && \
20-
dnf -y install httpd mod_ssl python39 python-pip git procps patch patchutils && \
20+
dnf -y install httpd mod_ssl python39 git procps patch patchutils && \
2121
dnf -y install wget && \
2222
dnf clean all && \
2323
rm -rf /var/cache/dnf
2424

25-
# Downgrade setuptools to avoid compatibility issues
26-
# TODO: remove once https://github.com/rucio/containers/issues/458 is resolved
27-
RUN dnf -y install https://vault.almalinux.org/9.6/BaseOS/x86_64/os/Packages/python3-setuptools-53.0.0-13.el9_6.1.noarch.rpm
25+
RUN python3 -m venv --system-site-packages /opt/rucio && \
26+
/opt/rucio/bin/pip install --no-cache-dir --upgrade pip && \
27+
/opt/rucio/bin/pip install --no-cache-dir --upgrade setuptools && \
28+
/opt/rucio/bin/pip install --no-cache-dir j2cli
2829

29-
RUN python3 -m pip install --no-cache-dir --upgrade pip && \
30-
python3 -m pip install --no-cache-dir --upgrade setuptools
31-
RUN python3 -m pip install --no-cache-dir j2cli
30+
# prepends venv with python to PATH, because there might be scripts depending on python being the correct executable
31+
ENV PATH /opt/rucio/bin:$PATH
3232

3333
WORKDIR /opt/rucio/webui
3434

webui/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ then
8383

8484
if [ -s ${tmp_bin_file} ]
8585
then
86-
if patch -p2 -d "/usr/local/bin/" < ${tmp_bin_file}
86+
if patch -p2 -d "/opt/rucio/bin/" < ${tmp_bin_file}
8787
then
8888
echo "Patch ${patchfile}/bin applied."
8989
else

0 commit comments

Comments
 (0)