base: print release version in case of running unsupported one

User may provide own base image but it needs to be supported one. If it
is not then we print info and error out.

So provide user with info which release is present in their image.

Change-Id: I0d8417fdeb2f02138d03cc57bd3b7b95bc43fc8f
This commit is contained in:
Marcin Juszkiewicz 2021-01-26 13:08:22 +01:00
parent 60bb16520c
commit ad3c18608f
1 changed files with 2 additions and 2 deletions

View File

@ -271,8 +271,8 @@ RUN {{ macros.install_packages(base_centos_yum_repo_packages | customizable("cen
# Ensure lsb_release exists
{{ macros.install_packages(['lsb-release']) }}
RUN if [ $(lsb_release -r -s) != "{{ supported_distro_release }}" ]; then \
echo "Only release '{{ supported_distro_release }}' is supported on {{ base_distro }}"; false; fi
RUN RELEASE=$(lsb_release -r -s); if [ $RELEASE != "{{ supported_distro_release }}" ]; then \
echo "Only release '{{ supported_distro_release }}' is supported on {{ base_distro }} while you have '$RELEASE'."; false; fi
# Customize PS1 bash shell
# enlarge 'system users' range so 'haproxy' package will not complain