Dockerfile 3.05 KB
Newer Older
Julien Leduc's avatar
Julien Leduc committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# ******************************************************************************
#
# The CERN Tape Archive (CTA) project
# Copyright (C) 2015  CERN
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
# ****************************************************************************/

21
# CTA generic image for system tests
22
# FROM must be the first command in Dockerfile!!
Julien Leduc's avatar
Julien Leduc committed
23
24
25

FROM gitlab-registry.cern.ch/linuxsupport/cc7-base

26
# my environment variables
27
28
ENV ORCHESTRATIONDIR="continuousintegration/orchestration/pods" \
    LOCALORCHESTRATIONDIR="/opt/ci" \
Julien Leduc's avatar
Julien Leduc committed
29
    BASEDIR="continuousintegration/docker/ctafrontend/cc7" \
30
    CTAREPODIR="/tmp/repo"
Julien Leduc's avatar
Julien Leduc committed
31

32
# Manage repos before running yum
33
ADD ${BASEDIR}/etc /etc
Julien Leduc's avatar
Julien Leduc committed
34

35
# yum update could be added at some point.
36
37
38
39
40
41
RUN yum install -y \
      yum-plugin-downloadonly \
      yum-plugin-priorities \
      yum-plugin-versionlock \
      createrepo epel-release \
  && \
42
43
44
45
46
47
48
49
    yum clean all


# where do we want to get xroot from?
# epel version is more recent but eos-citrine-depend repo has a higher priority (4) than epel
# => need to set epel prio to 4: yum-config-manager --setopt="epel.priority=4"
# or if taking the older version from eos, eos-citrine-depend must be enabled so that
# the older version of xroot is installed by cta-cli and is not conflicting later when installing eos...
50
51
# Newer version of CTA requires xroot >= 4.4.1-1...
# therefore set epel priority to 4...
52
# Create local repo for cta artifacts and to cache RPMs locally
53

54

55
56
# Populate local repository and enable it, then install any rpm that is needed for
# any container. Finally add needed directories.
57
RUN yum-config-manager --enable epel --setopt="epel.priority=4" \
58
  && \
59
60
61
    yum-config-manager --enable castor \
  && \
    yum install -y\
62
63
      eos-client \
      eos-server \
64
      xrootd \
65
66
67
      xrootd-client \
      xrootd-debuginfo \
      xrootd-server \
68
69
70
      oracle-instantclient12.2-basic \
      oracle-instantclient12.2-meta \
      oracle-instantclient12.2-sqlplus \
71
      cgdb \
72
73
74
75
76
      less \
      psmisc \
      lynx \
      strace \
      ltrace \
77
78
79
80
81
82
83
84
85
86
87
88
89
      heimdal-server \
      heimdal-workstation \
      ceph-common \
      mt-st \
      mtx \
      lsscsi \
      sg3_utils \
      castor-rmc-server \
      protobuf3 \
      cryptopp \
      json-c \
      castor-rmc-server \
      shadow-utils \
90
      sudo \
91
  && \
92
93
94
    yum clean all \
  && \
    mkdir -pv /etc/cta
95

96
97
98
# Mark the image as a buildtree image
RUN touch /etc/buildtreeRunner

Julien Leduc's avatar
Julien Leduc committed
99
# Docker image run setup
100
ADD ${BASEDIR}/run.sh /
101

Julien Leduc's avatar
Julien Leduc committed
102
ENTRYPOINT ["/run.sh"]