Install python-redis package to docker containers (#14632)

Install python-redis package to docker containers

#### Why I did it
This this bug: https://github.com/sonic-net/sonic-buildimage/issues/14531
The 'flush_unused_database' is part of docker-database, and docker-database does not install python-redis package by itself. it's using redis installed by sonic-py-swsssdk.
So after remove sonic-py-swsssdk from container, this script break.

To this this bug and avoid similer bug happen again, install python-redis to docker containers which removed sonic-py-swsssdk .

#### How I did it
Install python-redis to containers.

#### How to verify it
Pass all UT.
Create new UT to cover this scenario: https://github.com/sonic-net/sonic-mgmt/pull/8032

#### Description for the changelog
Improve sudo cat command for RO user.
This commit is contained in:
Hua Liu 2023-04-20 09:14:48 +08:00 committed by GitHub
parent d006219e2d
commit a14cc76879
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 0 deletions

View File

@ -23,6 +23,9 @@ RUN apt-get install -y \
RUN pip3 install pyangbind==0.8.1
RUN pip3 uninstall -y enum34
# Install python-redis
RUN pip3 install redis==4.5.4
{% if docker_config_engine_bullseye_debs.strip() %}
# Copy locally-built Debian package dependencies
{{ copy_files("debs/", docker_config_engine_bullseye_debs.split(' '), "/debs/") }}

View File

@ -23,6 +23,9 @@ RUN apt-get install -y \
RUN pip3 install pyangbind==0.8.1
RUN pip3 uninstall -y enum34
# Install python-redis
RUN pip3 install redis==4.5.4
{% if docker_config_engine_buster_debs.strip() %}
# Copy locally-built Debian package dependencies
{{ copy_files("debs/", docker_config_engine_buster_debs.split(' '), "/debs/") }}

View File

@ -10,6 +10,9 @@ RUN apt-get update && \
build-essential \
python-dev
# Install python-redis
RUN pip install redis>=3.5.3
{%- if CONFIGURED_ARCH == "armhf" or CONFIGURED_ARCH == "arm64" %}
RUN apt-get install -y \
libxslt-dev \

View File

@ -8,6 +8,9 @@ RUN apt-get update
# Dependencies for sonic-cfggen
RUN apt-get install -y build-essential python-dev
# Install python-redis
RUN pip install redis>=3.5.3
{% if docker_config_engine_debs.strip() %}
COPY \
{% for deb in docker_config_engine_debs.split(' ') -%}