Dockerfile_xrd_testing 2.44 KB
Newer Older
1
2
3
4
5
6
#
# Simple EOS Docker file
#
# Version 0.2

FROM centos:7
7
LABEL maintainer="Elvin Sindrilaru, esindril@cern.ch, CERN 2017"
8
9

# Add extra repositories
10
COPY eos-docker/el-7/*.repo /etc/yum.repos.d/
11
12

# Add helper scripts
13
COPY eos-docker/image_scripts/*.sh /
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/
25
26

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

28
RUN adduser eos-user
29
30
31
32
33
34
35
36
37

# Docker will aggressively cache the following command, but this is fine, since
# these packages are not updated often.
RUN yum -y --nogpg install \
    heimdal-server heimdal-workstation \
    krb5-workstation yum-plugin-priorities \
    createrepo initscripts less nano \
    git parallel compat-libf2c-34 libgfortran \
    gdb gcc-c++ cmake3 libacl-devel perl-Test-Harness \
38
39
    rpm-build bzip2 automake autoconf libtool sudo vim \
    at \
40
    && yum clean all
41
42
43
44

# Install new EOS from created repo - the ADD command will reset the docker cache,
# and any commands after that point will be uncached.
ENV EOSREPODIR="/repo/eos"
45
ADD cc7_xrd_testing_artifacts ${EOSREPODIR}
46

47
48
49
50
51
52
# 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 \
    && yum -y --nogpg --enablerepo=xrootd-testing --setopt="eos-depend.exclude=xrootd*,python2-xrootd*" install \
    davix grid-hammer quarkdb \
    eos-archive eos-client eos-debuginfo eos-fuse eos-fusex eos-ns-inspect eos-server eos-test eos-testkeytab \
53
    && yum clean all
54

55
56
57
58
59
60
61
62
# 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.
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
63

64
ENTRYPOINT ["/bin/bash"]