diff options
| author | Alex Schultz <aschultz@redhat.com> | 2019-01-15 16:58:25 -0700 |
|---|---|---|
| committer | Alex Schultz <aschultz@redhat.com> | 2019-01-17 08:23:41 -0700 |
| commit | ae1322ec10861678abe1137f3013030b34335bc7 (patch) | |
| tree | e3181569502d82f6b207dd258cffdb8058dc60ff /docker/base | |
| parent | fca732b81e4eb5daa56da16e338bdd305a56d5bd (diff) | |
| download | kolla-ae1322ec10861678abe1137f3013030b34335bc7.tar.gz kolla-ae1322ec10861678abe1137f3013030b34335bc7.zip | |
Use base_package_type
This change updates the docker files to use base_package_type instead
of doing specific distro checks for the rhel/deb generic cases. The
base_distro is still available and is used when a specific distro needs
a customization but if the differences are purely rpm vs deb, then the
base_package_type can be used.
Change-Id: I8d720bb185df65a0178061ccf20b1ab2265da2c5
Diffstat (limited to 'docker/base')
| -rw-r--r-- | docker/base/Dockerfile.j2 | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2 index 5b21dd1c5..e8e6300b0 100644 --- a/docker/base/Dockerfile.j2 +++ b/docker/base/Dockerfile.j2 @@ -27,7 +27,7 @@ RUN cat /tmp/kolla_bashrc >> /etc/skel/.bashrc \ # PS1 var when used /bin/sh shell ENV PS1="$(tput bold)($(printenv KOLLA_SERVICE_NAME))$(tput sgr0)[$(id -un)@$(hostname -s) $(pwd)]$ " -{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} +{% if base_package_type == 'rpm' %} # For RPM Variants, enable the correct repositories - this should all be done # in the base image so repos are consistent throughout the system. This also # enables to provide repo overrides at a later date in a simple fashion if we @@ -210,7 +210,7 @@ RUN yum -y install \ #### END REPO ENABLEMENT {# We are back to the basic if conditional here which is: - if base_distro in ['centos', 'oraclelinux', 'rhel'] #} + if base_package_type == 'rpm' #} {% set base_compiler_packages = [ 'gcc', @@ -252,8 +252,8 @@ RUN yum -y install \ {% endif %} {# endif for install type is source for RPM based distros #} -{# endif for base_distro centos,oraclelinux,rhel #} -{% elif base_distro in ['debian', 'ubuntu'] %} +{# endif for base_package_type rpm #} +{% elif base_package_type == 'deb' %} RUN if [ $(awk -F '=' '/DISTRIB_RELEASE/{print $2}' /etc/lsb-release) != "{{ supported_distro_release }}" ]; then \ echo "Only release '{{ supported_distro_release }}' is supported on {{ base_distro }}"; false; fi @@ -391,7 +391,7 @@ RUN sed -i \ && ln -s dist-packages /usr/lib/python2.7/site-packages {% endif %} -{# endif for base_distro debian, ubuntu #} +{# endif base_package_type deb #} {% endif %} COPY set_configs.py /usr/local/bin/kolla_set_configs |
