Dockerfile_c8 2.17 KB
Newer Older
Mihai Patrascoiu's avatar
Mihai Patrascoiu committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#
# EOS Docker file for CentOS 8
#
# Version 0.1

FROM centos:8
MAINTAINER Mihai Patrascoiu, mihai.patrascoiu@cern.ch, CERN 2020

# Add extra repositories
ADD eos-docker/el-8/*.repo /etc/yum.repos.d/

# Add helper scripts
ADD eos-docker/image_scripts/*.sh /

# Add configuration files for EOS instance
ADD eos-docker/eos.sysconfig /etc/sysconfig/eos
ADD eos-docker/xrd.cf.* eos-docker/krb5.conf /etc/
ADD eos-docker/fuse.conf /etc/eos/fuse.mount-1.conf
ADD eos-docker/fuse.conf /etc/eos/fuse.mount-2.conf
ADD eos-docker/fstfmd.dict /var/eos/md/

RUN mkdir /var/tmp/eosxd-cache/ /var/tmp/eosxd-journal/
RUN useradd eos-user

# Note: Docker will aggressively cache the following command.
#       However, these packages don't change often
RUN dnf -y install epel-release; \
    dnf -y --nogpg install \
    krb5-workstation createrepo initscripts \
    less nano sudo vim at bzip2 git parallel \
    rpm-build libgfortran libacl-devel perl-Test-Harness \
    gcc-c++ gdb cmake automake autoconf libtool

# 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 \
    eos-server eos-testkeytab eos-archive eos-client \
    eos-debuginfo eos-fuse eos-fusex eos-test eos-ns-inspect

# 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

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

ENTRYPOINT ["/bin/bash"]