aboutsummaryrefslogtreecommitdiff
path: root/docker/base
diff options
context:
space:
mode:
authorRadosław Piliszek <radoslaw.piliszek@gmail.com>2019-06-10 14:16:14 +0200
committerRadosław Piliszek <radoslaw.piliszek@gmail.com>2019-06-18 09:12:54 +0200
commit7ae5f1fe629554e588cd3992666af139e1efd9ce (patch)
treeb2b1f3ca536d5153fca1d861f886b40cc26ada95 /docker/base
parent45ef7176aead8d8b59135f8c168094600ea05f31 (diff)
downloadkolla-7ae5f1fe629554e588cd3992666af139e1efd9ce.tar.gz
kolla-7ae5f1fe629554e588cd3992666af139e1efd9ce.zip
Add a variable to configure repos disabled in base CentOS image
[1] disabled CentOS Ceph Nautilus repo for Stein. It turned out to be a problem for TripleO ([2]) which does not use upstream Ceph repo and actually relies on CentOS Ceph Nautilus repo. We did not leave the option to override our customization. This patch adds a customizable variable to base CentOS image: centos_yum_repos_to_disable [1] https://review.opendev.org/651601 [2] https://review.opendev.org/664244 Change-Id: I867ca75cafe853b206beae2f81dfb79b62d05557 Signed-off-by: Radosław Piliszek <radoslaw.piliszek@gmail.com>
Diffstat (limited to 'docker/base')
-rw-r--r--docker/base/Dockerfile.j217
1 files changed, 11 insertions, 6 deletions
diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2
index fda528330..1bc929680 100644
--- a/docker/base/Dockerfile.j2
+++ b/docker/base/Dockerfile.j2
@@ -149,13 +149,18 @@ RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
'yum-plugin-priorities'
] %}
-{{ macros.install_packages(base_centos_yum_repo_packages | customizable("centos_yum_repo_packages")) }}
-{% for key in base_centos_yum_repo_keys | customizable('centos_yum_repo_keys') %}
- {%- if loop.first %}RUN {% else %} && {% endif -%}
- rpm --import {{ key }} \
+{% set base_centos_yum_repos_to_disable = [
+] %}
+
+RUN {{ macros.install_packages(base_centos_yum_repo_packages | customizable("centos_yum_repo_packages"), chain=True, clean=False) }} \
+{% for repo in base_centos_yum_repos_to_disable | customizable('centos_yum_repos_to_disable') -%}
+ && yum-config-manager --disable {{ repo }} \
+{% endfor -%}
+{% for key in base_centos_yum_repo_keys | customizable('centos_yum_repo_keys') -%}
+ && rpm --import {{ key }} \
{% endfor -%}
-{%- if base_centos_yum_repo_keys|customizable('centos_yum_repo_keys')|length == 0 %}RUN {% else %} && {% endif -%}
- {{ macros.rpm_security_update(clean_package_cache) }}
+ && {{ macros.rpm_security_update(clean_package_cache) }}
+
{%- endif %}
{# Endif for base_distro centos #}