sonic-buildimage/dockers/docker-config-engine/Dockerfile.j2
Guohan Lu d04ad415b4 [docker-config-engine]: lockdown netaddr,ipaddr,jinja pip version
Signed-off-by: Guohan Lu <lguohan@gmail.com>
2020-06-25 06:58:02 +00:00

48 lines
1.2 KiB
Django/Jinja

FROM docker-base
## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
# Dependencies for sonic-cfggen
RUN apt-get install -y python-lxml python-yaml python-bitarray python-pip python-dev python-natsort
RUN pip install --upgrade pip
RUN pip install netaddr==0.7.19 ipaddr==2.2.0 jinja2==2.11.2 pyangbind==0.5.10
{% 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 -%}
## Clean up
RUN apt-get purge -y python-pip python-dev; apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs /python-wheels