2019-06-22 13:26:23 -05:00
|
|
|
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
|
2019-03-30 13:57:25 -05:00
|
|
|
FROM docker-config-engine-stretch
|
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 \
|
|
|
|
libdbus-1-3 \
|
|
|
|
libdaemon0 \
|
|
|
|
libjansson4 \
|
|
|
|
libpython2.7 \
|
|
|
|
iproute2 \
|
|
|
|
ndisc6 \
|
|
|
|
tcpdump \
|
|
|
|
# Install redis-tools dependencies
|
|
|
|
# TODO: implicitly install dependencies
|
|
|
|
libjemalloc1 \
|
|
|
|
libelf1 \
|
|
|
|
libmnl0 \
|
|
|
|
bridge-utils
|
|
|
|
|
|
|
|
RUN pip install \
|
|
|
|
scapy==2.4.2 \
|
|
|
|
setuptools \
|
|
|
|
pyroute2==0.5.3 \
|
|
|
|
netifaces==0.10.7 \
|
|
|
|
monotonic==1.5
|
|
|
|
|
|
|
|
{% 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"]
|
2018-07-26 15:39:08 -05:00
|
|
|
COPY ["enable_counters.py", "/usr/bin"]
|
2017-11-30 16:59:25 -06:00
|
|
|
COPY ["start.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
|
|
|
|
|
|
|
ENTRYPOINT ["/usr/bin/supervisord"]
|