2019-06-22 13:26:23 -05:00
|
|
|
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
|
2022-04-27 19:39:37 -05:00
|
|
|
FROM docker-base-stretch:-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}
|
2019-01-31 01:05:52 -06:00
|
|
|
|
|
|
|
## 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 \
|
2020-12-25 23:29:25 -06:00
|
|
|
python-dev
|
|
|
|
|
2023-04-19 20:14:48 -05:00
|
|
|
# Install python-redis
|
|
|
|
RUN pip install redis>=3.5.3
|
|
|
|
|
2020-12-15 10:44:46 -06:00
|
|
|
{%- if CONFIGURED_ARCH == "armhf" or CONFIGURED_ARCH == "arm64" %}
|
2020-12-25 23:29:25 -06:00
|
|
|
RUN apt-get install -y \
|
2020-12-15 10:44:46 -06:00
|
|
|
libxslt-dev \
|
2020-12-25 23:29:25 -06:00
|
|
|
libz-dev
|
2020-12-15 10:44:46 -06:00
|
|
|
{%- endif %}
|
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
|
|
|
|
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-dev && \
|
|
|
|
apt-get clean -y && \
|
|
|
|
apt-get autoclean -y && \
|
|
|
|
apt-get autoremove -y && \
|
|
|
|
rm -rf /debs /python-wheels
|