Permit changing yum configuration in the base image
This commit allows to configure yum settings via a yum.conf file that is shipped in the base image and make it overridable with the base_yum_conf jinja2 block. Change-Id: I76a84ec008fec5696cadefdbdeb4204a32421c4b Closes-Bug: #1698134
This commit is contained in:
parent
c90c576fb4
commit
0cba3b2ccd
@ -40,6 +40,10 @@ RUN CURRENT_DISTRO_RELEASE=$(awk '{match($0, /[0-9]+/,version)}END{print version
|
|||||||
&& cat /tmp/kolla_bashrc >> /etc/bashrc \
|
&& cat /tmp/kolla_bashrc >> /etc/bashrc \
|
||||||
&& sed -i 's|^\(override_install_langs=.*\)|# \1|' /etc/yum.conf
|
&& sed -i 's|^\(override_install_langs=.*\)|# \1|' /etc/yum.conf
|
||||||
|
|
||||||
|
{% block base_yum_conf %}
|
||||||
|
COPY yum.conf /etc/yum.conf
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
#### BEGIN REPO ENABLEMENT
|
#### BEGIN REPO ENABLEMENT
|
||||||
{% set base_yum_repo_files = [
|
{% set base_yum_repo_files = [
|
||||||
] %}
|
] %}
|
||||||
|
9
docker/base/yum.conf
Normal file
9
docker/base/yum.conf
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[main]
|
||||||
|
keepcache=0
|
||||||
|
logfile=/var/log/yum.log
|
||||||
|
exactarch=1
|
||||||
|
obsoletes=1
|
||||||
|
gpgcheck=1
|
||||||
|
plugins=1
|
||||||
|
installonly_limit=0
|
||||||
|
skip_missing_names_on_install=False
|
@ -1,7 +1,7 @@
|
|||||||
{% macro install_packages(packages) -%}
|
{% macro install_packages(packages) -%}
|
||||||
{% if packages is defined and packages|length > 0 -%}
|
{% if packages is defined and packages|length > 0 -%}
|
||||||
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] -%}
|
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] -%}
|
||||||
RUN yum --setopt skip_missing_names_on_install=False -y install {{ packages | join(' ') }} && yum clean all
|
RUN yum -y install {{ packages | join(' ') }} && yum clean all
|
||||||
{%- elif base_distro in ['debian', 'ubuntu'] -%}
|
{%- elif base_distro in ['debian', 'ubuntu'] -%}
|
||||||
{#-
|
{#-
|
||||||
debian_package_install is a utility method to build up an appropriate
|
debian_package_install is a utility method to build up an appropriate
|
||||||
|
4
releasenotes/notes/yum_conf-36fef802e8c003f1.yaml
Normal file
4
releasenotes/notes/yum_conf-36fef802e8c003f1.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- Allow to configure yum settings, and provide a default yum.conf that is
|
||||||
|
overridable via the base_yum_conf jinja2 block.
|
Loading…
Reference in New Issue
Block a user