Dockerfile_ubuntu_focal 3.07 KB
Newer Older
Fabio Luchetti's avatar
Fabio Luchetti committed
1
2
3
4
5
#
# Simple EOS Docker file
#
# Version 0.1

Fabio Luchetti's avatar
Fabio Luchetti committed
6
FROM ubuntu:focal
Fabio Luchetti's avatar
Fabio Luchetti committed
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
LABEL maintainer="Fabio Luchetti faluchet@cern.ch, CERN 2020"

RUN apt-get update

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

# Add configuration files for EOS instance
COPY eos-docker/eos.sysconfig /etc/sysconfig/eos
COPY eos-docker/xrd.cf.* eos-docker/krb5.conf /etc/
COPY eos-docker/fuse.eosdockertest.conf /etc/eos/fuse.eosdockertest.conf
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/

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

24
RUN adduser eos-user && adduser eosnobody
Fabio Luchetti's avatar
Fabio Luchetti committed
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get install -y software-properties-common \
    && apt-get install -y --no-install-recommends apt-utils \
    && apt-get install -y \
    at autoconf automake \
    build-essential bzip2 \
    cmake cpio curl \
    emacs \
    fort77 \
    gcc gdb gdebi-core gfortran-8 git g++ \
    heimdal-servers \
    krb5-admin-server krb5-kdc krb5-user \
    libpam-ccreds libpam-krb5 libtool \
    nano \
    parallel perl python3 python3-pip \
Fabio Luchetti's avatar
Fabio Luchetti committed
42
    redis rpm2cpio rsync \
Fabio Luchetti's avatar
Fabio Luchetti committed
43
44
    sqlite3 \
    vim \
45
46
47
    wget \
    && apt-get clean

48
# Python2 and python2-pip usage is being discouraged, but we still need it for our tests.
49
50
51
# Temporarely use obsoleted 2.7 get-pip script. 
# ATM it looks unlikely that a generic wrapper for obsolete versions will be provided upstream.
# If ever, please consult and/or revert to the more general https://bootstrap.pypa.io/get-pip.py
52
RUN apt-get install -y curl python2 \
53
    && curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py \
54
55
    && python2 get-pip.py \
    && ln -s /usr/bin/python2 /usr/bin/python
Fabio Luchetti's avatar
Fabio Luchetti committed
56
57
58
59
60
61
62

# Add XRootd repo
# @todo once the XRootD deb repos are better structured we can point to a
# particular stable branch. For the moment, we force install the version we want
# Priority >= 1000 causes a version to be installed even if this constitutes a downgrade of the package
RUN curl -sL http://storage-ci.web.cern.ch/storage-ci/storageci.key | apt-key add - \
    && apt-get update \
Fabio Luchetti's avatar
Fabio Luchetti committed
63
64
    && echo "deb http://storage-ci.web.cern.ch/storage-ci/debian/xrootd focal release" >> /etc/apt/sources.list \
    && echo "deb-src http://storage-ci.web.cern.ch/storage-ci/debian/xrootd focal release" >> /etc/apt/sources.list \
Fabio Luchetti's avatar
Fabio Luchetti committed
65
    && add-apt-repository 'deb http://storage-ci.web.cern.ch/storage-ci/debian/xrootd focal release' \
66
    && echo "Package: xrootd* libxrd* libxrootd*\nPin: version 4.12.8\nPin-Priority: 1000" > /etc/apt/preferences.d/xrootd.pref
Fabio Luchetti's avatar
Fabio Luchetti committed
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86

# Create local repo from eos artifacts
ENV EOSREPODIR="/debs/eos/"
ADD focal_artifacts ${EOSREPODIR}

RUN cd ${EOSREPODIR} \
    && dpkg-scanpackages . > Packages \
    && gzip --keep -9 Packages \
    && echo "deb [trusted=yes] file:${EOSREPODIR} ./\n" >> /etc/apt/sources.list

RUN apt-get clean \
    && apt-get update \
    && apt-get install -y eos-client eos-fuse eos-fusex eos-test eos-testkeytab

RUN chown daemon:daemon /etc/eos.keytab \
    && chmod 400 /etc/eos.keytab

ENV DEBIAN_FRONTEND default

ENTRYPOINT ["/bin/bash"]