Dockerfile 3.27 KB
Newer Older
Elvin Sindrilaru's avatar
Elvin Sindrilaru committed
1
#
Elvin Sindrilaru's avatar
Elvin Sindrilaru committed
2
# Simple EOS Docker file
Elvin Sindrilaru's avatar
Elvin Sindrilaru committed
3
#
4
# Version 0.3
Elvin Sindrilaru's avatar
Elvin Sindrilaru committed
5

6
FROM centos:7
7
LABEL maintainer="Elvin Sindrilaru, esindril@cern.ch, CERN 2017"
Elvin Sindrilaru's avatar
Elvin Sindrilaru committed
8

9
10
ARG EOS_CODENAME

11
# Add extra repositories
12
COPY eos-docker/el-7/*.repo /etc/yum.repos.d/
Elvin Sindrilaru's avatar
Elvin Sindrilaru committed
13

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

17
# Add configuration files for EOS instance
18
19
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
20
COPY eos-docker/fuse.eosdockertest.conf /etc/eos/fuse.eosdockertest.conf
21
22
23
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/
24

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

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

33
RUN mkdir /var/tmp/eosxd-cache/ /var/tmp/eosxd-journal/
34
RUN adduser eos-user && adduser eosnobody
Jozsef Makai's avatar
Jozsef Makai committed
35

36
37
# Docker will aggressively cache the following command, but this is fine, since
# these packages are not updated often.
38
RUN yum -y --nogpg install \
39
40
41
    at autoconf automake \
    bzip2 \
    centos-release-scl-rh cmake3 compat-libf2c-34 createrepo \
Fabio Luchetti's avatar
Fabio Luchetti committed
42
    emacs epel-release \
43
    gcc-c++ gdb git \
44
    heimdal-server heimdal-workstation \
45
    initscripts \
46
    krb5-server krb5-workstation \
47
48
    less libacl-devel libgfortran libtool \
    nano \
49
    parallel perl-Test-Harness python2 python2-pip python3 python3-pip \
Fabio Luchetti's avatar
Fabio Luchetti committed
50
    redhat-lsb-core redis root rpm-build \
51
52
    sudo \
    vim \
53
    xauth \
54
    yum-plugin-priorities \
55
    && yum clean all
56

57
58
# Install new EOS from created repo - the ADD command will reset the docker cache,
# and any commands after that point will be uncached.
59
ENV EOSREPODIR="/repo/eos"
Jozsef Makai's avatar
Jozsef Makai committed
60
ADD cc7_artifacts ${EOSREPODIR}
61

Mihai Patrascoiu's avatar
Mihai Patrascoiu committed
62
# Special packages, must be installed un-cached.
63
64
65
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 \
    && yum -y --nogpg install \
66
67
    davix eos-archive eos-client eos-fuse eos-fusex eos-ns-inspect \
    eos-server eos-test eos-testkeytab eos-folly-2019.11.11.00 eos-folly-deps-2019.11.11.00 \
68
    && yum clean all
jmakai's avatar
jmakai committed
69

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

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

82
83
84
85
86
# 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

87

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

91
ENTRYPOINT ["/bin/bash"]