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

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
18
19
20
21
22
23
24
COPY eos-docker/eos.sysconfig /etc/sysconfig/eos
COPY eos-docker/xrd.cf.* eos-docker/krb5.conf /etc/
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
25
26

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

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

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

# 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; \
    dnf -y --nogpg install quarkdb davix; \
    dnf -y --nogpg install \
51
    eos-server eos-testkeytab eos-client eos-ns-inspect \
52
53
    eos-fuse eos-fusex eos-test eos-debuginfo \
    && dnf clean all
Mihai Patrascoiu's avatar
Mihai Patrascoiu committed
54

55
56
57
58
59
60
61
# *************
# 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
62
# fails. This happens on CC7 and C8.
63
64
RUN dnf -y --nogpg install xrootd-client

Mihai Patrascoiu's avatar
Mihai Patrascoiu committed
65
66
67
68
# 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.
69
70
71
72
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
73
74
75
76

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

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

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