Dockerfile_coverage 3.5 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
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/
26
27

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

29
RUN adduser eos-user
30
31
32
33

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

# Install devtoolset-6
RUN yum -y --nogpg install devtoolset-6
    
# 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"
ADD cc7_coverage_artifacts ${EOSREPODIR}

60
61
62
63
64
65
# Special packages, must be installed un-cached.
RUN createrepo ${EOSREPODIR} \
    && echo -e "[eos-coverage-artifacts]\nname=EOS Coverage artifacts\nbaseurl=file://${EOSREPODIR}\ngpgcheck=0\nenabled=1\npriority=1" >> /etc/yum.repos.d/eos.repo \
    && echo -e '[eos-depend]\nname=EOS dependencies\nbaseurl=http://storage-ci.web.cern.ch/storage-ci/eos/citrine-depend/el-7/x86_64/\ngpgcheck=0\nenabled=1\npriority=1\n' >> /etc/yum.repos.d/eos-depend.repo \
    && yum -y --nogpg install \
    davix grid-hammer quarkdb \
66
    eos-archive eos-client eos-fuse eos-fusex eos-server eos-test eos-testkeytab eos-coverage \
67
    && yum clean all
68
69
70
71
72
73
74
75
76
77
78

# Setup environment for coverage profiling
ADD eos-docker/coverage/image/ /eos-coverage/
ENV GCOV_PREFIX="/var/eos/coverage/"
ENV GCOV_PREFIX_STRIP=4
RUN echo -e "export EOS_COVERAGE_REPORT=1" >> /etc/sysconfig/eos 

# Move source files to expected location
# Note: the source file location is hardcoded into the ".gcno" files.
#       Although there are ways to workaround this with lcovrc settings, the underlying gcov tool used will still throw many warnings.
#       For this reason, we prefer to move the source files to the expected location.
79
80
RUN mkdir -p /root/rpmbuild/BUILD/ \
    && cp -r --preserve /usr/src/debug/eos-* /root/rpmbuild/BUILD/
81

82
83
84
85
86
87
88
89
# 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
90
91

ENTRYPOINT ["/bin/bash"]