-
Notifications
You must be signed in to change notification settings - Fork 68
Expand file tree
/
Copy pathDockerfile
More file actions
91 lines (76 loc) · 2.79 KB
/
Copy pathDockerfile
File metadata and controls
91 lines (76 loc) · 2.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Copyright European Organization for Nuclear Research (CERN) 2017
#
# Licensed under the Apache License, Version 2.0 (the "License");
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
FROM docker.io/almalinux:9
ARG TAG
WORKDIR /tmp
RUN dnf install -y epel-release.noarch && \
dnf upgrade -y && \
dnf install -y \
gridsite \
libnsl \
libaio \
patch \
procps-ng \
python-pip \
python-mod_wsgi \
memcached \
patchutils && \
dnf clean all && \
rm -rf /var/cache/dnf
# cx_oracle requires `gcc` and Python headers, not present by default on arm64
ARG TARGETARCH
RUN if [ $TARGETARCH = "arm64" ]; then \
dnf install -y \
gcc \
python3-devel && \
dnf clean all && \
rm -rf /var/cache/dnf; \
fi
RUN rpm -i https://download.oracle.com/otn_software/linux/instantclient/1912000/oracle-instantclient19.12-basiclite-19.12.0.0.0-1.x86_64.rpm; \
echo "/usr/lib/oracle/19/client64/lib" >/etc/ld.so.conf.d/oracle.conf; \
ldconfig
# Downgrade setuptools to avoid compatibility issues
# TODO: remove once https://github.com/rucio/containers/issues/458 is resolved
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
RUN python3 -m pip install --no-cache-dir --upgrade pip && \
python3 -m pip install --no-cache-dir --upgrade setuptools
RUN python3 -m pip install --no-cache-dir --pre rucio[oracle,mysql,postgresql]==$TAG
COPY j2.py /usr/local/bin/
RUN python3 -m pip install --no-cache-dir jinja2 && \
ln -s j2.py /usr/local/bin/j2
ADD gacl /etc/httpd/
ADD rucio.config.default.cfg /tmp/
ADD rucio.conf.j2 /tmp/
ADD httpd.conf.j2 /tmp/
ADD 00-mpm.conf.j2 /tmp/
ADD docker-entrypoint.sh /
ADD robots.txt /var/www/html
RUN rm /etc/httpd/conf.d/zgridsite.conf \
/etc/httpd/conf.d/welcome.conf \
/etc/httpd/conf.d/userdir.conf \
/etc/httpd/conf.d/ssl.conf
RUN mkdir -p /var/log/rucio/trace && chown apache:apache /var/log/rucio/trace
RUN mkdir -p /var/log/rucio/nongrid_trace && chown apache:apache /var/log/rucio/nongrid_trace
RUN update-crypto-policies --set DEFAULT:SHA1
VOLUME /var/log/httpd
VOLUME /opt/rucio/etc
EXPOSE 80
EXPOSE 443
ARG POLICY_PACKAGE_REQUIREMENTS
ARG USER=root
USER root
RUN if [ -n "$POLICY_PACKAGE_REQUIREMENTS" ]; then \
dnf install -y git && \
for package in $(echo $POLICY_PACKAGE_REQUIREMENTS | tr "," "\n"); do \
python3 -m pip install --no-cache-dir $package; \
done; \
dnf remove -y git && \
dnf autoremove && \
dnf clean all && \
rm -rf /var/cache/dnf; \
fi
USER ${USER}
ENTRYPOINT ["/docker-entrypoint.sh"]