Dockerfile_cs8 4.02 KB
Newer Older
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
#
# EOS Docker file for CentOS Stream 8
#
# Version 0.1
# @note: use el-8 compatible rpms until we set a stable el-8s equivalent


FROM quay.io/centos/centos:stream8
LABEL maintainer="Fabio Luchetti, fabio.luchetti@cern.ch, CERN 2021"

ARG EOS_CODENAME

# Add extra repositories
COPY eos-docker/el-8/*.repo /etc/yum.repos.d/

# Add helper scripts
COPY eos-docker/image_scripts/*.sh /

# Add configuration files for EOS instance
COPY eos-docker/eos.sysconfig /etc/sysconfig/eos
COPY eos-docker/xrd.cf.* eos-docker/krb5.conf /etc/
COPY eos-docker/fuse.eosdockertest.conf /etc/eos/fuse.eosdockertest.conf
COPY eos-docker/fuse.conf /etc/eos/fuse.mount-1.conf
COPY eos-docker/fuse.conf /etc/eos/fuse.mount-2.conf
COPY eos-docker/fstfmd.dict /var/eos/md/

# Add configuration files for forwarding proxy server
COPY eos-docker/xrootd.conf /etc/tmpfiles.d/
COPY eos-docker/xrootd-fwd-proxy.cfg /etc/xrootd/

# Set correct path for the dependency repository based on the EOS version
# which is being built
RUN sed -i "s/__EOS_CODENAME__/${EOS_CODENAME}/g" /etc/yum.repos.d/eos.repo

RUN mkdir /var/tmp/eosxd-cache/ /var/tmp/eosxd-journal/

37
RUN adduser eos-user && adduser eosnobody
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
92

# Note: Docker will aggressively cache the following command.
#       However, these packages don't change often
RUN dnf -y install epel-release dnf-plugins-core \
    && dnf -y --nogpg install \
    at autoconf automake \
    bzip2 \
    cmake createrepo \
    emacs epel-release \
    gcc-c++ gdb git glibc-all-langpacks \
    initscripts \
    krb5-server krb5-workstation \
    less libacl-devel libgfortran libtool \
    nano \
    parallel perl-Test-Harness python2 python2-pip python3 python3-pip \
    redhat-lsb-core redis root rpm-build rsync \
    sqlite sudo \
    vim \
    xauth \
    && dnf clean all

# Install manually libzstd which was dropped from EPEL
RUN dnf install -y https://kojipkgs.fedoraproject.org//packages/zstd/1.4.4/1.el8/x86_64/libzstd-1.4.4-1.el8.x86_64.rpm \
    https://kojipkgs.fedoraproject.org//packages/zstd/1.4.4/1.el8/x86_64/libzstd-devel-1.4.4-1.el8.x86_64.rpm \
    https://kojipkgs.fedoraproject.org//packages/zstd/1.4.4/1.el8/x86_64/zstd-1.4.4-1.el8.x86_64.rpm \
    https://kojipkgs.fedoraproject.org//packages/zstd/1.4.4/1.el8/x86_64/libzstd-debuginfo-1.4.4-1.el8.x86_64.rpm \
    https://kojipkgs.fedoraproject.org//packages/zstd/1.4.4/1.el8/x86_64/zstd-debuginfo-1.4.4-1.el8.x86_64.rpm


# Install EOS from locally created repo
# Note: the ADD command will reset the docker cache
# and any commands after that point will be uncached
ENV EOSREPODIR="/repo/eos"
ADD cs8_artifacts ${EOSREPODIR}

# Special packages, must be installed un-cached
RUN createrepo ${EOSREPODIR}; \
    echo -e "[eos-artifacts]\nname=EOS artifacts\nbaseurl=file://${EOSREPODIR}\ngpgcheck=0\nenabled=1\npriority=1" >> /etc/yum.repos.d/eos.repo \
    && dnf -y --nogpg install \
    davix eos-archive eos-client eos-fuse eos-fusex eos-ns-inspect \
    eos-server eos-test eos-testkeytab \
    && dnf clean all

RUN if [ "${EOS_CODENAME}" != "diopside" ]; then yum -y --nogpg install quarkdb; else yum -y --nogpg install eos-quarkdb; fi

# *************
# NOTE: !UGLY!*
# *************
# This is an ugly hack but the FST ofs.tpc config requires /usr/bin/xrdcp
# and this is provided by the xrootd-client package. With EOS having eos-xrootd
# as dependency the xrdcp program is in /opt/eos/xrootd/bin/xrdcp and the
# xrootd-client package is no longer installed and therefore starting the FSTs
# fails. This happens on CC7 and C8.
RUN dnf -y --nogpg install xrootd-client

93
94
95
96
# Swap and use the forwardable keytab (installed by the eos-testkeytab package).
# This is useful for clients who reside on a private network and tunnel through a
# Network Address Translation (NAT) device. You can remove these lines if you don't need them.
RUN mv -f /etc/eos.keytab.fw /etc/eos.keytab
97
98
99
100
101
102
103
104

# Change owner of /var/spool/xrootd directory to daemon
RUN chown daemon:daemon /var/spool/xrootd

# The system tests have a strong bias towards nobody having uid=99 guid=99
RUN usermod -u 99 nobody && groupmod -g 99 nobody

ENTRYPOINT ["/bin/bash"]