Dockerfile_c8 3.78 KB
Newer Older
Mihai Patrascoiu's avatar
Mihai Patrascoiu committed
1
2
3
4
5
#
# EOS Docker file for CentOS 8
#
# Version 0.1

6
FROM centos:8
7
LABEL maintainer="Mihai Patrascoiu, mihai.patrascoiu@cern.ch, CERN 2020"
Mihai Patrascoiu's avatar
Mihai Patrascoiu committed
8
9

# Add extra repositories
10
COPY eos-docker/el-8/*.repo /etc/yum.repos.d/
Mihai Patrascoiu's avatar
Mihai Patrascoiu committed
11
12

# Add helper scripts
13
COPY eos-docker/image_scripts/*.sh /
Mihai Patrascoiu's avatar
Mihai Patrascoiu committed
14
15

# Add configuration files for EOS instance
16
17
COPY eos-docker/eos.sysconfig /etc/sysconfig/eos
COPY eos-docker/xrd.cf.* eos-docker/krb5.conf /etc/
Fabio Luchetti's avatar
Fabio Luchetti committed
18
COPY eos-docker/fuse.eosdockertest.conf /etc/eos/fuse.eosdockertest.conf
19
20
21
22
23
24
25
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/
Mihai Patrascoiu's avatar
Mihai Patrascoiu committed
26
27

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

29
RUN adduser eos-user
Mihai Patrascoiu's avatar
Mihai Patrascoiu committed
30
31
32

# Note: Docker will aggressively cache the following command.
#       However, these packages don't change often
33
RUN dnf -y install epel-release dnf-plugins-core \
34
    && dnf -y --nogpg install \
35
36
37
38
39
40
41
42
43
    at autoconf automake \
    bzip2 \
    cmake createrepo \
    emacs \
    gcc-c++ gdb git \
    initscripts \
    krb5-server krb5-workstation \
    less libacl-devel libgfortran libtool \
    nano \
44
    parallel perl-Test-Harness python2 python2-pip python3 python3-pip \
45
    redhat-lsb-core rpm-build rsync \
46
47
    sqlite sudo \
    vim \
48
    xauth \
49
    && dnf clean all
Mihai Patrascoiu's avatar
Mihai Patrascoiu committed
50

51
52
53
54
# 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 \
Elvin Sindrilaru's avatar
Elvin Sindrilaru committed
55
56
57
    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

58

Mihai Patrascoiu's avatar
Mihai Patrascoiu committed
59
60
61
62
63
64
65
66
67
# 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 c8_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; \
68
    dnf -y --nogpg install quarkdb davix; \
Mihai Patrascoiu's avatar
Mihai Patrascoiu committed
69
    dnf -y --nogpg install \
70
    eos-server eos-testkeytab eos-client eos-ns-inspect \
71
    eos-fuse eos-fusex eos-test \
72
    && dnf clean all
Mihai Patrascoiu's avatar
Mihai Patrascoiu committed
73

74
75
76
77
78
79
80
# *************
# 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
81
# fails. This happens on CC7 and C8.
82
83
RUN dnf -y --nogpg install xrootd-client

Mihai Patrascoiu's avatar
Mihai Patrascoiu committed
84
85
86
87
# Generate a new forwardable keytab 'eos-test+' to replace the not-forwardable
# one (installed by the eos-testkeytab package).
# This is useful to deploy EOS on Kubernetes clusters running on CERN's Cloud
# Infrastructure; you can remove these lines if you don't need one.
88
89
90
91
RUN yes | xrdsssadmin -k eos-test del /etc/eos.keytab \
    && yes | xrdsssadmin -u daemon -g daemon -k eos-test+ -n 1234567890123456789 add /etc/eos.keytab \
    && chown daemon:daemon /etc/eos.keytab \
    && chmod 400 /etc/eos.keytab
Mihai Patrascoiu's avatar
Mihai Patrascoiu committed
92
93
94
95

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

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

Mihai Patrascoiu's avatar
Mihai Patrascoiu committed
99
ENTRYPOINT ["/bin/bash"]