2019-06-22 13:26:23 -05:00
|
|
|
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
|
2019-01-31 01:05:52 -06:00
|
|
|
FROM docker-base-stretch
|
|
|
|
|
|
|
|
## Make apt-get non-interactive
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
2019-06-22 13:26:23 -05:00
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get install -y \
|
|
|
|
# Dependencies for sonic-cfggen
|
|
|
|
python-lxml \
|
|
|
|
python-yaml \
|
|
|
|
python-bitarray \
|
|
|
|
python-pip \
|
|
|
|
python-dev \
|
|
|
|
python-natsort \
|
|
|
|
python-setuptools
|
2019-01-31 01:05:52 -06:00
|
|
|
|
|
|
|
RUN pip install --upgrade pip
|
|
|
|
|
2019-06-22 13:26:23 -05:00
|
|
|
RUN pip install \
|
|
|
|
netaddr \
|
|
|
|
ipaddr \
|
|
|
|
jinja2 \
|
|
|
|
pyangbind==0.5.10
|
2019-01-31 01:05:52 -06:00
|
|
|
|
|
|
|
{% if docker_config_engine_stretch_debs.strip() %}
|
2019-06-22 13:26:23 -05:00
|
|
|
# Copy locally-built Debian package dependencies
|
|
|
|
{{ copy_files("debs/", docker_config_engine_stretch_debs.split(' '), "/debs/") }}
|
2019-01-31 01:05:52 -06:00
|
|
|
|
2019-06-22 13:26:23 -05:00
|
|
|
# Install locally-built Debian packages and implicitly install their dependencies
|
|
|
|
{{ install_debian_packages(docker_config_engine_stretch_debs.split(' ')) }}
|
|
|
|
{% endif %}
|
2019-01-31 01:05:52 -06:00
|
|
|
|
|
|
|
{% if docker_config_engine_stretch_whls.strip() %}
|
2019-06-22 13:26:23 -05:00
|
|
|
# Copy locally-built Python wheel dependencies
|
|
|
|
{{ copy_files("python-wheels/", docker_config_engine_stretch_whls.split(' '), "/python-wheels/") }}
|
2019-01-31 01:05:52 -06:00
|
|
|
|
2019-06-22 13:26:23 -05:00
|
|
|
# Install locally-built Python wheel dependencies
|
|
|
|
{{ install_python_wheels(docker_config_engine_stretch_whls.split(' ')) }}
|
|
|
|
{% endif %}
|
2019-01-31 01:05:52 -06:00
|
|
|
|
|
|
|
## Clean up
|
2019-06-22 13:26:23 -05:00
|
|
|
RUN apt-get purge -y \
|
|
|
|
python-pip \
|
|
|
|
python-dev && \
|
|
|
|
apt-get clean -y && \
|
|
|
|
apt-get autoclean -y && \
|
|
|
|
apt-get autoremove -y && \
|
|
|
|
rm -rf /debs /python-wheels
|