@@ -41,8 +41,6 @@ RUN dnf -y install yum-utils epel-release.noarch && \
4141 nmap-ncat \
4242 openssh-clients \
4343 openssl-devel \
44- python3-setuptools \
45- python3-pip \
4644 python3-devel \
4745 python3-mod_wsgi \
4846 python3-m2crypto \
@@ -62,22 +60,20 @@ RUN curl https://rclone.org/install.sh | bash
6260RUN git clone --depth 1 --branch "$TAG" https://github.com/rucio/rucio.git /tmp/rucio && rm -rf /tmp/rucio/.git
6361
6462ENV RUCIOHOME=/opt/rucio
65- RUN mkdir -p $RUCIOHOME && \
66- mkdir -p $RUCIOHOME/etc/multi_vo/tst/etc && \
67- mkdir -p $RUCIOHOME/etc/multi_vo/ts2/etc
63+ ENV RUCIO_VENV=/opt/rucio-venv
64+ RUN python3 -m venv --system-site-packages "$RUCIO_VENV" && \
65+ mkdir -p "$RUCIOHOME/etc/multi_vo/tst/etc" \
66+ "$RUCIOHOME/etc/multi_vo/ts2/etc" \
67+ "$RUCIOHOME/bin" \
68+ "$RUCIOHOME/etc" \
69+ "$RUCIOHOME/lib/rucio" \
70+ "$RUCIOHOME/tools"
6871WORKDIR $RUCIOHOME
69- RUN mkdir -p \
70- bin \
71- etc \
72- lib/rucio \
73- tools
7472
75- RUN python3 -m pip install --no-cache --upgrade pip && \
76- python3 -m pip install --no-cache --upgrade --ignore-installed setuptools wheel && \
77- python3 -m pip install --no-cache --upgrade -r /tmp/rucio/requirements/requirements.dev.txt ; \
78- ln -s $RUCIOHOME/lib/rucio /usr/local/lib/python3.9/site-packages/rucio
79-
80- RUN python3 -m pip install --no-cache --upgrade fts3
73+ RUN "$RUCIO_VENV/bin/pip" install --no-cache --upgrade pip setuptools wheel && \
74+ "$RUCIO_VENV/bin/pip" install --no-cache --upgrade -r /tmp/rucio/requirements/requirements.dev.txt && \
75+ "$RUCIO_VENV/bin/pip" install --no-cache --upgrade fts3 && \
76+ ln -s "$RUCIOHOME/lib/rucio" "$RUCIO_VENV/lib/python3.9/site-packages/rucio"
8177
8278COPY .pep8 .pep8
8379COPY .flake8 .flake8
@@ -127,7 +123,7 @@ RUN rm -r /tmp/rucio && \
127123RUN update-crypto-policies --set DEFAULT:SHA1
128124
129125EXPOSE 443
130- ENV PATH $PATH :$RUCIOHOME/bin
126+ ENV PATH=$RUCIO_VENV/bin :$RUCIOHOME/bin:$PATH
131127RUN mkdir /tmp/prometheus && chown apache:apache /tmp/prometheus/
132- ENV PROMETHEUS_MULTIPROC_DIR /tmp/prometheus
128+ ENV PROMETHEUS_MULTIPROC_DIR= /tmp/prometheus
133129CMD ["httpd" ,"-D" ,"FOREGROUND" ]
0 commit comments