Skip to content

Commit d859a4e

Browse files
liuh-80mssonicbld
authored andcommitted
Install python-redis package to docker containers (#14632)
Install python-redis package to docker containers #### Why I did it This this bug: #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: sonic-net/sonic-mgmt#8032 #### Description for the changelog Improve sudo cat command for RO user.
1 parent be75dd9 commit d859a4e

4 files changed

Lines changed: 12 additions & 0 deletions

File tree

dockers/docker-config-engine-bullseye/Dockerfile.j2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ RUN apt-get install -y \
2323
RUN pip3 install pyangbind==0.8.1
2424
RUN pip3 uninstall -y enum34
2525

26+
# Install python-redis
27+
RUN pip3 install redis==4.5.4
28+
2629
{% if docker_config_engine_bullseye_debs.strip() %}
2730
# Copy locally-built Debian package dependencies
2831
{{ copy_files("debs/", docker_config_engine_bullseye_debs.split(' '), "/debs/") }}

dockers/docker-config-engine-buster/Dockerfile.j2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ RUN apt-get install -y \
2323
RUN pip3 install pyangbind==0.8.1
2424
RUN pip3 uninstall -y enum34
2525

26+
# Install python-redis
27+
RUN pip3 install redis==4.5.4
28+
2629
{% if docker_config_engine_buster_debs.strip() %}
2730
# Copy locally-built Debian package dependencies
2831
{{ copy_files("debs/", docker_config_engine_buster_debs.split(' '), "/debs/") }}

dockers/docker-config-engine-stretch/Dockerfile.j2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ RUN apt-get update && \
1010
build-essential \
1111
python-dev
1212

13+
# Install python-redis
14+
RUN pip install redis>=3.5.3
15+
1316
{%- if CONFIGURED_ARCH == "armhf" or CONFIGURED_ARCH == "arm64" %}
1417
RUN apt-get install -y \
1518
libxslt-dev \

dockers/docker-config-engine/Dockerfile.j2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ RUN apt-get update
88
# Dependencies for sonic-cfggen
99
RUN apt-get install -y build-essential python-dev
1010

11+
# Install python-redis
12+
RUN pip install redis>=3.5.3
13+
1114
{% if docker_config_engine_debs.strip() %}
1215
COPY \
1316
{% for deb in docker_config_engine_debs.split(' ') -%}

0 commit comments

Comments
 (0)