diff options
| author | Jenkins <jenkins@review.openstack.org> | 2016-06-01 05:13:10 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2016-06-01 05:13:10 +0000 |
| commit | 2bed574032c9b7aeb1676f1e2f251ce0d045515c (patch) | |
| tree | 560902049020fc6c65a904d2293c81bf11a5ce58 /docker | |
| parent | abef69d40518cf2697e5a4fb4485ffb99476ed29 (diff) | |
| parent | 4044a3475e51f763f8d4f3feda003f0a4837f177 (diff) | |
| download | kolla-2bed574032c9b7aeb1676f1e2f251ce0d045515c.tar.gz kolla-2bed574032c9b7aeb1676f1e2f251ce0d045515c.zip | |
Merge "Pin the base distro release version"
Diffstat (limited to 'docker')
| -rw-r--r-- | docker/base/Dockerfile.j2 | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2 index 07fbf8b0d..84a4fd374 100644 --- a/docker/base/Dockerfile.j2 +++ b/docker/base/Dockerfile.j2 @@ -24,6 +24,9 @@ ENV PS1="$(tput bold)($(printenv KOLLA_SERVICE_NAME))$(tput sgr0)[$(id -un)@$(ho {% if base_distro in ['fedora', 'centos', 'oraclelinux', 'rhel'] %} +RUN if [ $(awk '{match($0, /[0-9]+/,version)}END{print version[0]}' /etc/system-release) != "{{ supported_distro_release }}" ]; then \ + echo "Only supported {{ supported_distro_release }} release on {{ base_distro }}"; false; fi + # Customize PS1 bash shell RUN cat /tmp/kolla_bashrc >> /etc/bashrc @@ -181,6 +184,9 @@ RUN yum -y install \ {# endif for base_distro centos,fedora,oraclelinux,rhel #} {% elif base_distro in ['ubuntu', 'debian'] %} +RUN if [ $(awk -F '=' '/DISTRIB_RELEASE/{print $2}' /etc/lsb-release) != "{{ supported_distro_release }}" ]; then \ + echo "Only supported {{ supported_distro_release }} release on {{ base_distro }}"; false; fi + # Customize PS1 bash shell RUN cat /tmp/kolla_bashrc >> /etc/bash.bashrc |
