aboutsummaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorJeffrey Zhang <jeffrey.zhang@99cloud.net>2016-05-23 10:15:38 +0800
committerJeffrey Zhang <jeffrey.zhang@99cloud.net>2016-05-31 01:41:48 +0000
commit4044a3475e51f763f8d4f3feda003f0a4837f177 (patch)
tree0f2931ac4ccd19dd60f813a12dd3810bc3cd1ba9 /docker
parent3545e6d503c7451921333134fb75d3fef3713952 (diff)
downloadkolla-4044a3475e51f763f8d4f3feda003f0a4837f177.tar.gz
kolla-4044a3475e51f763f8d4f3feda003f0a4837f177.zip
Pin the base distro release version
Pin the base distro release version in the master branch(Newton). Only one distro version is supported. The supported versions are: * CentOS: 7 * RedHat: 7 * OracleLinux: 7 * Debian: 8 * Ubuntu: 14.04 NOTE: Kolla will move to Ubuntu 16.04 in the Newton cycle DocImpact TrivialFix Change-Id: I32c0edbee4de14c8a0cc7c961d566e84d70f19a4
Diffstat (limited to 'docker')
-rw-r--r--docker/base/Dockerfile.j26
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