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
|
2020-10-26 15:48:50 -05:00
|
|
|
build-essential \
|
2019-06-22 13:26:23 -05:00
|
|
|
python-pip \
|
|
|
|
python-dev \
|
|
|
|
python-setuptools
|
2019-01-31 01:05:52 -06:00
|
|
|
|
|
|
|
RUN pip install --upgrade pip
|
|
|
|
|
|
|
|
{% 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
|
|
|
|
2020-10-23 15:08:35 -05:00
|
|
|
# Copy files
|
|
|
|
COPY ["files/swss_vars.j2", "/usr/share/sonic/templates/"]
|
|
|
|
|
2019-01-31 01:05:52 -06:00
|
|
|
## Clean up
|
2019-06-22 13:26:23 -05:00
|
|
|
RUN apt-get purge -y \
|
2020-10-26 15:48:50 -05:00
|
|
|
build-essential \
|
2019-06-22 13:26:23 -05:00
|
|
|
python-pip \
|
|
|
|
python-dev && \
|
|
|
|
apt-get clean -y && \
|
|
|
|
apt-get autoclean -y && \
|
|
|
|
apt-get autoremove -y && \
|
|
|
|
rm -rf /debs /python-wheels
|