a14cc76879
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.
50 lines
1.2 KiB
Django/Jinja
50 lines
1.2 KiB
Django/Jinja
FROM docker-base-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}
|
|
|
|
## Make apt-get non-interactive
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
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(' ') -%}
|
|
debs/{{ deb }}{{' '}}
|
|
{%- endfor -%}
|
|
debs/
|
|
{%- endif -%}
|
|
|
|
{% if docker_config_engine_debs.strip() %}
|
|
RUN dpkg -i \
|
|
{% for deb in docker_config_engine_debs.split(' ') -%}
|
|
debs/{{ deb }}{{' '}}
|
|
{%- endfor %}
|
|
{%- endif -%}
|
|
|
|
{% if docker_config_engine_whls.strip() %}
|
|
COPY \
|
|
{% for whl in docker_config_engine_whls.split(' ') -%}
|
|
python-wheels/{{ whl }}{{' '}}
|
|
{%- endfor -%}
|
|
python-wheels/
|
|
{%- endif -%}
|
|
|
|
{% if docker_config_engine_whls.strip() %}
|
|
RUN pip install \
|
|
{% for whl in docker_config_engine_whls.split(' ') -%}
|
|
python-wheels/{{ whl }}{{' '}}
|
|
{%- endfor %}
|
|
{%- endif -%}
|
|
|
|
# Copy files
|
|
COPY ["files/swss_vars.j2", "/usr/share/sonic/templates/"]
|
|
|
|
## Clean up
|
|
RUN apt-get purge -y build-essential python-dev; apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
|
|
RUN rm -rf /debs /python-wheels
|