Commit 5e052130 authored by Fabio Luchetti's avatar Fabio Luchetti
Browse files

Rework the dockerfile for the minimal image

parent 5864afb6
Pipeline #2527557 skipped with stage
......@@ -7,48 +7,36 @@ FROM centos:7
LABEL maintainer="Fabio Luchetti, fabio.luchetti@cern.ch, CERN 2021"
# One of {citrine, diopside}
ARG EOS_CODENAME=citrine
# One of {commit, tag-testing, tag}
ARG REPOBRANCH=tag
COPY eos-docker/minimal/el-7/epel.repo /etc/yum.repos.d/epel.repo
COPY eos-docker/minimal/el-7/eos.repo /etc/yum.repos.d/eos.repo
COPY eos-docker/minimal/el-7/quarkdb.repo /etc/yum.repos.d/quarkdb.repo
RUN sed -i "s|__EOS_CODENAME__|${EOS_CODENAME}|g" /etc/yum.repos.d/eos.repo
# epel-release: for eos dependencies
# createrepo: to make repo out of local dirs in the dockerbuild
RUN yum -y install epel-release createrepo && yum clean all
# Install new EOS from created repo
ENV EOSREPODIR="/repo/eos"
ADD cc7_artifacts ${EOSREPODIR}
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 \
RUN yum -y --nogpg install epel-release \
&& yum -y --nogpg --enablerepo="eos-${REPOBRANCH}" install \
eos-archive eos-client eos-fusex eos-ns-inspect \
eos-server eos-test eos-testkeytab davix \
&& yum clean all
RUN if [ "${EOS_CODENAME}" != "diopside" ]; then yum -y --nogpg install quarkdb && yum clean all; fi
&& if [ "${EOS_CODENAME}" != "diopside" ]; then yum -y --nogpg install quarkdb; fi \
&& yum clean all && rm -rf /var/cache/yum
# Just install some much needed utility
RUN yum -y install nano redis && yum clean all
# @todo check these, chose one
# RUN yum install -y --nogpg install xrootd-client && yum clean all
# RUN ln -s /opt/eos/xrootd/bin/xrdcp /usr/bin/xrdcp
RUN sed -i "s|/usr/bin/xrdcp|/opt/eos/xrootd/bin/xrdcp|g" /etc/xrd.cf.fst
# *************
# 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
# fails. This happens on CC7 and C8.
# @todo review: what about changing the FST ofs.tpc config and point to the eos-xrootd path?
RUN yum install -y --nogpg install xrootd-client
# Install some much needed utility: please bloat with care!
RUN yum -y --nogpg install nano redis && yum clean all && rm -rf /var/cache/yum
# 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.
# one (installed by the eos-testkeytab package). This is mmostly useful to deploy EOS
# on containerized envoronments; you can remove these lines if you don't need one.
# @todo review: what about not installing eos-testkeytab at all?
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 \
......
[eos-__EOS_CODENAME__-depend]
[eos-depend]
name=EOS __EOS_CODENAME__ Dependencies
baseurl=https://storage-ci.web.cern.ch/storage-ci/eos/__EOS_CODENAME__-depend/el-7/x86_64/
gpgcheck=0
enabled=1
priority=2
[eos-__EOS_CODENAME__-commit]
[eos-commit]
name=EOS __EOS_CODENAME__ Commit Version
baseurl=https://storage-ci.web.cern.ch/storage-ci/eos/__EOS_CODENAME__/commit/el-7/x86_64/
gpgcheck=0
enabled=0
[eos-__EOS_CODENAME__-tag-testing]
[eos-tag-testing]
name=EOS __EOS_CODENAME__ Tag Testing Version
baseurl=https://storage-ci.web.cern.ch/storage-ci/eos/__EOS_CODENAME__/tag/testing/el-7/x86_64/
gpgcheck=0
enabled=0
[eos-__EOS_CODENAME__-tag]
[eos-tag]
name=EOS __EOS_CODENAME__ Tag Version
baseurl=https://storage-ci.web.cern.ch/storage-ci/eos/__EOS_CODENAME__/tag/el-7/x86_64/
gpgcheck=0
......
[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
exclude=*xrootd*
[epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch/debug
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
exclude=xrootd*
[epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
#baseurl=http://download.fedoraproject.org/pub/epel/7/SRPMS
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
exclude=xrootd*
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment