2019-06-22 13:26:23 -05:00
|
|
|
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
|
2020-07-03 16:31:31 -05:00
|
|
|
FROM docker-config-engine-buster
|
2016-12-05 13:12:19 -06:00
|
|
|
|
2018-06-25 12:48:42 -05:00
|
|
|
ARG docker_container_name
|
2018-08-13 00:23:58 -05:00
|
|
|
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf
|
2018-06-25 12:48:42 -05:00
|
|
|
|
2020-10-26 15:48:50 -05:00
|
|
|
# Make apt-get non-interactive
|
2017-02-16 23:48:49 -06:00
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
2019-06-22 13:26:23 -05:00
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get install -f -y \
|
|
|
|
ifupdown \
|
|
|
|
arping \
|
|
|
|
iproute2 \
|
|
|
|
ndisc6 \
|
|
|
|
tcpdump \
|
|
|
|
libelf1 \
|
|
|
|
libmnl0 \
|
2020-01-29 19:40:43 -06:00
|
|
|
bridge-utils \
|
2020-10-05 10:48:13 -05:00
|
|
|
conntrack \
|
2020-10-26 15:48:50 -05:00
|
|
|
ndppd \
|
|
|
|
# Needed for installing netifaces Python package
|
|
|
|
build-essential \
|
|
|
|
python3-dev
|
2019-06-22 13:26:23 -05:00
|
|
|
|
2019-09-11 11:41:38 -05:00
|
|
|
{% if ( CONFIGURED_ARCH == "armhf" or CONFIGURED_ARCH == "arm64" ) %}
|
2021-08-05 09:00:50 -05:00
|
|
|
# Fix for gcc/python/iputils-ping not found in arm docker
|
2019-09-11 11:41:38 -05:00
|
|
|
RUN apt-get install -f -y python2.7 python2.7-dev
|
2021-08-05 09:00:50 -05:00
|
|
|
RUN apt-get install -y \
|
|
|
|
gcc-8 \
|
|
|
|
iputils-ping
|
2019-09-11 11:41:38 -05:00
|
|
|
{% endif %}
|
|
|
|
{% if CONFIGURED_ARCH == "armhf" %}
|
2020-12-03 14:38:50 -06:00
|
|
|
RUN ln -s -f /usr/bin/gcc-8 /usr/bin/arm-linux-gnueabihf-gcc
|
2019-09-11 11:41:38 -05:00
|
|
|
{% endif %}
|
|
|
|
{% if CONFIGURED_ARCH == "arm64" %}
|
2020-12-03 14:38:50 -06:00
|
|
|
RUN ln -s -f /usr/bin/gcc-8 /usr/bin/aarch64-linux-gnu-gcc
|
2019-07-26 00:06:41 -05:00
|
|
|
{% endif %}
|
|
|
|
|
2020-12-15 13:06:30 -06:00
|
|
|
# Dependencies of restore_neighbors.py
|
|
|
|
RUN pip3 install \
|
|
|
|
scapy==2.4.4 \
|
|
|
|
pyroute2==0.5.14 \
|
|
|
|
netifaces==0.10.9
|
|
|
|
|
2019-09-11 11:41:38 -05:00
|
|
|
{% if ( CONFIGURED_ARCH == "armhf" or CONFIGURED_ARCH == "arm64" ) %}
|
2019-07-26 00:06:41 -05:00
|
|
|
# Remove installed gcc
|
2020-12-03 14:38:50 -06:00
|
|
|
RUN apt-get remove -y gcc-8
|
2019-07-26 00:06:41 -05:00
|
|
|
{% endif %}
|
|
|
|
|
2019-06-22 13:26:23 -05:00
|
|
|
{% if docker_orchagent_debs.strip() -%}
|
|
|
|
# Copy locally-built Debian package dependencies
|
|
|
|
{{ copy_files("debs/", docker_orchagent_debs.split(' '), "/debs/") }}
|
|
|
|
|
|
|
|
# Install locally-built Debian packages and implicitly install their dependencies
|
|
|
|
{{ install_debian_packages(docker_orchagent_debs.split(' ')) }}
|
|
|
|
{%- endif %}
|
2016-12-05 13:12:19 -06:00
|
|
|
|
2020-10-26 15:48:50 -05:00
|
|
|
# Clean up
|
|
|
|
RUN apt-get purge -y \
|
|
|
|
build-essential \
|
|
|
|
python3-dev && \
|
|
|
|
apt-get clean -y && \
|
|
|
|
apt-get autoclean -y && \
|
|
|
|
apt-get autoremove -y && \
|
2019-06-22 13:26:23 -05:00
|
|
|
rm -rf /debs
|
2016-12-05 13:12:19 -06:00
|
|
|
|
2017-11-30 16:59:25 -06:00
|
|
|
COPY ["files/arp_update", "/usr/bin"]
|
2020-09-18 20:44:23 -05:00
|
|
|
COPY ["arp_update.conf", "files/arp_update_vars.j2", "/usr/share/sonic/templates/"]
|
2020-10-05 10:48:13 -05:00
|
|
|
COPY ["ndppd.conf", "/usr/share/sonic/templates/"]
|
2021-12-14 16:45:23 -06:00
|
|
|
COPY ["enable_counters.py", "tunnel_packet_handler.py", "/usr/bin/"]
|
2020-12-13 13:35:39 -06:00
|
|
|
COPY ["docker-init.sh", "orchagent.sh", "swssconfig.sh", "buffermgrd.sh", "/usr/bin/"]
|
2019-05-01 10:02:38 -05:00
|
|
|
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
|
2017-10-29 13:50:57 -05:00
|
|
|
|
2020-10-26 15:48:50 -05:00
|
|
|
# Copy all Jinja2 template files into the templates folder
|
2017-10-29 13:50:57 -05:00
|
|
|
COPY ["*.j2", "/usr/share/sonic/templates/"]
|
2017-05-08 17:43:31 -05:00
|
|
|
|
2020-05-15 19:09:16 -05:00
|
|
|
ENTRYPOINT ["/usr/bin/docker-init.sh"]
|