@@ -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,19 @@ 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+ RUN python3 -m venv --system-site-packages "$RUCIOHOME" && \
64+ mkdir -p "$RUCIOHOME/etc/multi_vo/tst/etc" \
65+ "$RUCIOHOME/etc/multi_vo/ts2/etc" \
66+ "$RUCIOHOME/lib/rucio" \
67+ "$RUCIOHOME/tools"
6868WORKDIR $RUCIOHOME
69- RUN mkdir -p \
70- bin \
71- etc \
72- lib/rucio \
73- tools
69+ ENV PATH=$RUCIOHOME/bin:$PATH
7470
75- RUN python3 -m pip install --no-cache --upgrade pip && \
76- python3 -m pip install --no-cache --upgrade 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
71+ RUN "$RUCIOHOME/bin/pip" install --no-cache --upgrade pip && \
72+ "$RUCIOHOME/bin/pip" install --no-cache --upgrade setuptools wheel && \
73+ "$RUCIOHOME/bin/pip" install --no-cache --upgrade -r /tmp/rucio/requirements/requirements.dev.txt && \
74+ "$RUCIOHOME/bin/pip" install --no-cache --upgrade fts3 && \
75+ ln -s ../../rucio "$RUCIOHOME/lib/python3.9/site-packages/rucio"
8176
8277COPY .pep8 .pep8
8378COPY .flake8 .flake8
@@ -109,25 +104,23 @@ RUN chmod 777 /var/log/rucio/trace && \
109104 echo "" > /etc/httpd/conf.d/welcome.conf && \
110105 echo "" > /etc/httpd/conf.d/zgridsite.conf
111106
112- COPY logshow restartweb run_daemons create_monit_data /usr/local /bin/
107+ COPY logshow restartweb run_daemons create_monit_data $RUCIOHOME /bin/
113108COPY monit-entrypoint.sh /monit-entrypoint.sh
114109
115110COPY dashboards/* $RUCIOHOME/etc/dashboards/
116111COPY rse_repository.json $RUCIOHOME/etc/rse_repository.json
117112
118113RUN rm -r /tmp/rucio && \
119- chmod +x /usr/local/bin/logshow && \
120- chmod +x /usr/local/bin/restartweb && \
121- chmod +x /usr/local/bin/run_daemons && \
122- chmod +x /usr/local/bin/create_monit_data && \
123- chmod +x $RUCIOHOME/etc/dashboards/import_dashboards.sh && \
124- chmod +x /monit-entrypoint.sh && \
125- ln -fs /usr/bin/python3 /usr/bin/python
114+ chmod +x "$RUCIOHOME/bin/logshow" \
115+ "$RUCIOHOME/bin/restartweb" \
116+ "$RUCIOHOME/bin/run_daemons" \
117+ "$RUCIOHOME/bin/create_monit_data" \
118+ "$RUCIOHOME/etc/dashboards/import_dashboards.sh" \
119+ /monit-entrypoint.sh
126120
127121RUN update-crypto-policies --set DEFAULT:SHA1
128122
129123EXPOSE 443
130- ENV PATH $PATH:$RUCIOHOME/bin
131124RUN mkdir /tmp/prometheus && chown apache:apache /tmp/prometheus/
132125ENV PROMETHEUS_MULTIPROC_DIR /tmp/prometheus
133126CMD ["httpd" ,"-D" ,"FOREGROUND" ]
0 commit comments