Skip to content

Commit

Permalink
Install python-redis package to docker containers (#14632)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
liuh-80 authored and mssonicbld committed Apr 23, 2023
1 parent be75dd9 commit d859a4e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dockers/docker-config-engine-bullseye/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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/") }}
Expand Down
3 changes: 3 additions & 0 deletions dockers/docker-config-engine-buster/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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/") }}
Expand Down
3 changes: 3 additions & 0 deletions dockers/docker-config-engine-stretch/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
3 changes: 3 additions & 0 deletions dockers/docker-config-engine/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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(' ') -%}
Expand Down

0 comments on commit d859a4e

Please sign in to comment.