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
|
|
|
|
2017-02-16 23:48:49 -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 -f -y \
|
|
|
|
ifupdown \
|
|
|
|
arping \
|
|
|
|
iproute2 \
|
|
|
|
ndisc6 \
|
|
|
|
tcpdump \
|
|
|
|
libelf1 \
|
|
|
|
libmnl0 \
|
2020-01-29 19:40:43 -06:00
|
|
|
bridge-utils \
|
|
|
|
conntrack
|
2019-06-22 13:26:23 -05:00
|
|
|
|
2019-09-11 11:41:38 -05:00
|
|
|
{% if ( CONFIGURED_ARCH == "armhf" or CONFIGURED_ARCH == "arm64" ) %}
|
2019-07-26 00:06:41 -05:00
|
|
|
## Fix for gcc/python not found in arm docker
|
2019-09-11 11:41:38 -05:00
|
|
|
RUN apt-get install -f -y python2.7 python2.7-dev
|
2019-07-26 00:06:41 -05:00
|
|
|
RUN apt-get install -y gcc-6
|
2019-09-11 11:41:38 -05:00
|
|
|
{% endif %}
|
|
|
|
{% if CONFIGURED_ARCH == "armhf" %}
|
2019-07-26 00:06:41 -05:00
|
|
|
RUN ln -s -f /usr/bin/gcc-6 /usr/bin/arm-linux-gnueabihf-gcc
|
2019-09-11 11:41:38 -05:00
|
|
|
{% endif %}
|
|
|
|
{% if CONFIGURED_ARCH == "arm64" %}
|
|
|
|
RUN ln -s -f /usr/bin/gcc-6 /usr/bin/aarch64-linux-gnu-gcc
|
2019-07-26 00:06:41 -05:00
|
|
|
{% endif %}
|
|
|
|
|
2019-06-22 13:26:23 -05:00
|
|
|
RUN pip install \
|
|
|
|
scapy==2.4.2 \
|
|
|
|
setuptools \
|
2019-07-26 00:06:41 -05:00
|
|
|
pyroute2==0.5.3
|
|
|
|
RUN pip install \
|
2019-06-22 13:26:23 -05:00
|
|
|
netifaces==0.10.7 \
|
|
|
|
monotonic==1.5
|
|
|
|
|
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
|
|
|
|
RUN apt-get remove -y gcc-6
|
|
|
|
{% 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
|
|
|
|
|
|
|
## Clean up
|
2019-06-22 13:26:23 -05:00
|
|
|
RUN apt-get clean -y && \
|
|
|
|
apt-get autoclean -y && \
|
|
|
|
apt-get autoremove -y && \
|
|
|
|
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-05-15 19:09:16 -05:00
|
|
|
COPY ["arp_update.conf", "/usr/share/sonic/templates/"]
|
2018-07-26 15:39:08 -05:00
|
|
|
COPY ["enable_counters.py", "/usr/bin"]
|
2020-05-15 19:09:16 -05:00
|
|
|
COPY ["docker-init.sh", "orchagent.sh", "swssconfig.sh", "/usr/bin/"]
|
2017-05-08 17:43:31 -05:00
|
|
|
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
|
2019-05-01 10:02:38 -05:00
|
|
|
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
|
|
|
|
COPY ["critical_processes", "/etc/supervisor/"]
|
2017-10-29 13:50:57 -05:00
|
|
|
|
|
|
|
## Copy all Jinja2 template files into the templates folder
|
|
|
|
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"]
|