2017-12-12 02:38:36 -06:00
|
|
|
FROM docker-config-engine
|
2016-12-05 13:12:19 -06:00
|
|
|
|
2018-06-25 12:48:42 -05:00
|
|
|
ARG docker_container_name
|
2018-09-11 16:57:29 -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
|
|
|
|
|
2017-12-12 02:38:36 -06:00
|
|
|
COPY ["sonic-dev.gpg.key", "/etc/apt/"]
|
|
|
|
RUN apt-key add /etc/apt/sonic-dev.gpg.key
|
|
|
|
RUN echo "deb http://packages.microsoft.com/repos/sonic-dev/ jessie main" >> /etc/apt/sources.list
|
2016-12-05 13:12:19 -06:00
|
|
|
RUN apt-get update
|
|
|
|
|
2017-12-12 02:38:36 -06:00
|
|
|
RUN apt-get install -y net-tools \
|
|
|
|
arping \
|
|
|
|
ethtool \
|
|
|
|
tcpdump \
|
|
|
|
ifupdown \
|
|
|
|
bridge-utils \
|
|
|
|
python-ply \
|
|
|
|
libqt5core5a \
|
|
|
|
libqt5network5 \
|
|
|
|
libboost-program-options1.55.0 \
|
|
|
|
libboost-system1.55.0 \
|
|
|
|
libboost-thread1.55.0 \
|
|
|
|
libgmp10 \
|
|
|
|
libjudydebian1 \
|
|
|
|
libnanomsg0 \
|
|
|
|
libdaemon0 \
|
|
|
|
libjansson4 \
|
2019-07-04 00:16:10 -05:00
|
|
|
libatomic1 \
|
2017-12-12 02:38:36 -06:00
|
|
|
libjemalloc1 \
|
2019-07-04 00:16:10 -05:00
|
|
|
liblua5.1-0 \
|
|
|
|
lua-bitop \
|
|
|
|
lua-cjson \
|
2017-12-12 02:38:36 -06:00
|
|
|
openssh-client \
|
|
|
|
openssh-server \
|
|
|
|
libc-ares2 \
|
|
|
|
iproute \
|
|
|
|
libpython2.7 \
|
|
|
|
grub2-common \
|
|
|
|
python-click \
|
|
|
|
python-natsort \
|
|
|
|
python-tabulate \
|
|
|
|
bash-completion \
|
|
|
|
libelf1 \
|
|
|
|
libmnl0
|
|
|
|
|
|
|
|
RUN pip install setuptools
|
|
|
|
RUN pip install py2_ipaddress
|
2016-12-05 13:12:19 -06:00
|
|
|
|
2017-01-19 14:19:21 -06:00
|
|
|
COPY \
|
|
|
|
{% for deb in docker_sonic_p4_debs.split(' ') -%}
|
|
|
|
debs/{{ deb }}{{' '}}
|
|
|
|
{%- endfor -%}
|
|
|
|
debs/
|
2016-12-05 13:12:19 -06:00
|
|
|
|
2016-12-23 17:22:06 -06:00
|
|
|
RUN dpkg -i \
|
|
|
|
{% for deb in docker_sonic_p4_debs.split(' ') -%}
|
|
|
|
debs/{{ deb }}{{' '}}
|
|
|
|
{%- endfor %}
|
2016-12-05 13:12:19 -06:00
|
|
|
|
|
|
|
## Clean up
|
|
|
|
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
|
2016-12-23 17:22:06 -06:00
|
|
|
RUN rm -rf /debs
|
2016-12-05 13:12:19 -06:00
|
|
|
|
2017-12-12 02:38:36 -06:00
|
|
|
RUN sed -ri 's/^(save .*$)/# \1/g; \
|
|
|
|
s/^daemonize yes$/daemonize no/; \
|
2016-12-21 22:30:47 -06:00
|
|
|
s/^logfile .*$/logfile ""/; \
|
|
|
|
s/^# syslog-enabled no$/syslog-enabled no/; \
|
2017-12-12 02:38:36 -06:00
|
|
|
s/^# unixsocket/unixsocket/; \
|
|
|
|
s/notify-keyspace-events ""/notify-keyspace-events AKE/; \
|
|
|
|
s/^client-output-buffer-limit pubsub [0-9]+mb [0-9]+mb [0-9]+/client-output-buffer-limit pubsub 0 0 0/ \
|
2016-12-21 22:30:47 -06:00
|
|
|
' /etc/redis/redis.conf
|
|
|
|
|
2017-12-12 02:38:36 -06:00
|
|
|
ADD port_config.ini /port_config.ini
|
|
|
|
COPY ["start.sh", "orchagent.sh", "config_bm.sh", "/usr/bin/"]
|
|
|
|
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
|
|
|
|
COPY ["files/configdb-load.sh", "/usr/bin/"]
|
|
|
|
COPY ["files/arp_update", "/usr/bin"]
|
2020-08-24 16:04:10 -05:00
|
|
|
COPY ["init_cfg.json", "/etc/sonic/"]
|
2017-12-12 02:38:36 -06:00
|
|
|
RUN echo "docker-sonic-p4" > /etc/hostname
|
|
|
|
RUN touch /etc/quagga/zebra.conf
|
|
|
|
|
2018-06-25 12:48:42 -05:00
|
|
|
ENTRYPOINT ["/bin/bash"]
|