1- ARG CENTOS_VERSION = 7.5 .1804
1+ ARG CENTOS_VERSION = 7.5 .1804
22
33FROM centos :$ {CENTOS_VERSION }
44
55# Remove all repositories
66RUN rm /etc /yum .repos .d /*
77
88# Add only the specific CentOS 7.5 repositories, because that's what XS used for the majority of packages
9- ARG CENTOS_VERSION
9+ ARG CENTOS_VERSION
1010COPY files /CentOS - Vault .repo .in /etc /yum .repos .d /CentOS - Vault - 7.5 .repo
1111RUN sed - e "s/@CENTOS_VERSION@/${CENTOS_VERSION}/g" - i /etc /yum .repos .d /CentOS - Vault - 7.5 .repo
1212
1313# Add our repositories
1414# Repository file depends on the target version of XCP-ng, and is pre-processed by build.sh
15- ARG XCP_NG_BRANCH = 8.3
15+ ARG XCP_NG_BRANCH = 8.3
1616COPY files /xcp - ng .repo .8. x .in /etc /yum .repos .d /xcp - ng .repo
1717RUN sed - e "s/@XCP_NG_BRANCH@/${XCP_NG_BRANCH}/g" - i /etc /yum .repos .d /xcp - ng .repo
1818
1919# Install GPG key
2020RUN curl - sSf https ://xcp-ng.org/RPM-GPG-KEY-xcpng -o /etc/pki/rpm-gpg/RPM-GPG-KEY-xcpng
2121
22- # Fix invalid rpmdb checksum error with overlayfs, see https://github.com/docker/docker/issues/10180
23- # (still needed ?)
24- RUN yum install - y yum - plugin - ovl
25-
26- # Use priorities so that packages from our repositories are preferred over those from CentOS repositories
27- RUN yum install - y yum - plugin - priorities
28-
2922# Update
30- RUN yum update - y
31-
32- # Common build requirements
33- RUN yum install - y \
23+ RUN yum update - y \
24+ # Fix invalid rpmdb checksum error with overlayfs, see https://github.com/docker/docker/issues/10180
25+ # (still needed ?)
26+ && yum install - y yum - plugin - ovl \
27+ # Use priorities so that packages from our repositories are preferred over those from CentOS repositories
28+ & & yum install - y yum - plugin - priorities \
29+ # Common build requirements
30+ & & yum install - y \
3431 gcc \
3532 gcc - c ++ \
3633 git \
@@ -41,16 +38,14 @@ RUN yum install -y \
4138 sudo \
4239 yum - utils \
4340 epel - release \
44- epel - rpm - macros
45-
46- # Niceties
47- RUN yum install - y \
41+ epel - rpm - macros \
42+ # Niceties
43+ && yum install - y \
4844 vim \
4945 wget \
50- which
51-
52- # clean package cache to avoid download errors
53- RUN yum clean all
46+ which \
47+ # clean package cache to avoid download errors
48+ & & yum clean all
5449
5550# OCaml in XS may be older than in CentOS
5651RUN sed - i "/gpgkey/a exclude=ocaml*" /etc /yum .repos .d /Cent * /etc /yum .repos .d /epel *
0 commit comments