2017-10-24 00:01:42 -05:00
|
|
|
FROM docker-config-engine
|
|
|
|
|
2018-06-25 12:48:42 -05:00
|
|
|
ARG docker_container_name
|
|
|
|
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name\/%syslogtag%/;" /etc/rsyslog.conf
|
|
|
|
|
2017-10-24 00:01:42 -05:00
|
|
|
## Make apt-get non-interactive
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
2017-11-30 16:59:25 -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
|
2017-10-24 00:01:42 -05:00
|
|
|
RUN apt-get update
|
|
|
|
|
|
|
|
RUN apt-get install -y net-tools \
|
2017-11-30 16:59:25 -06:00
|
|
|
arping \
|
2017-10-24 00:01:42 -05:00
|
|
|
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 \
|
|
|
|
libjemalloc1 \
|
|
|
|
openssh-client \
|
|
|
|
openssh-server \
|
|
|
|
libc-ares2 \
|
2017-11-03 19:13:39 -05:00
|
|
|
iproute \
|
2017-11-30 16:59:25 -06:00
|
|
|
libpython2.7 \
|
|
|
|
grub2-common \
|
|
|
|
python-click-default-group \
|
|
|
|
python-click \
|
|
|
|
python-natsort \
|
|
|
|
python-tabulate \
|
|
|
|
bash-completion \
|
|
|
|
libelf1 \
|
|
|
|
libmnl0
|
2017-10-24 00:01:42 -05:00
|
|
|
|
2017-11-14 05:23:39 -06:00
|
|
|
RUN pip install setuptools
|
|
|
|
RUN pip install py2_ipaddress
|
2017-11-13 16:38:07 -06:00
|
|
|
|
2018-05-02 13:46:21 -05:00
|
|
|
{% if docker_sonic_vs_debs.strip() -%}
|
|
|
|
# Copy locally-built Debian package dependencies
|
|
|
|
{%- for deb in docker_sonic_vs_debs.split(' ') %}
|
|
|
|
COPY debs/{{ deb }} /debs/
|
2017-10-24 00:01:42 -05:00
|
|
|
{%- endfor %}
|
|
|
|
|
2018-05-02 13:46:21 -05:00
|
|
|
# Install locally-built Debian packages and implicitly install their dependencies
|
|
|
|
{%- for deb in docker_sonic_vs_debs.split(' ') %}
|
|
|
|
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /debs/{{ deb }}
|
|
|
|
{%- endfor %}
|
|
|
|
{%- endif %}
|
|
|
|
|
|
|
|
# Clean up
|
|
|
|
RUN apt-get clean -y
|
|
|
|
RUN apt-get autoclean -y
|
|
|
|
RUN apt-get autoremove -y
|
|
|
|
RUN rm -rf /debs ~/.cache
|
2017-10-24 00:01:42 -05:00
|
|
|
|
2017-11-13 16:38:07 -06:00
|
|
|
RUN sed -ri 's/^(save .*$)/# \1/g; \
|
|
|
|
s/^daemonize yes$/daemonize no/; \
|
2017-10-24 00:01:42 -05:00
|
|
|
s/^logfile .*$/logfile ""/; \
|
|
|
|
s/^# syslog-enabled no$/syslog-enabled no/; \
|
2017-11-13 16:38:07 -06:00
|
|
|
s/^# unixsocket/unixsocket/; \
|
2017-11-30 16:59:25 -06:00
|
|
|
s/notify-keyspace-events ""/notify-keyspace-events AKE/; \
|
2017-11-13 16:38:07 -06:00
|
|
|
s/^client-output-buffer-limit pubsub [0-9]+mb [0-9]+mb [0-9]+/client-output-buffer-limit pubsub 0 0 0/ \
|
2017-10-24 00:01:42 -05:00
|
|
|
' /etc/redis/redis.conf
|
|
|
|
|
|
|
|
COPY ["50-default.conf", "/etc/rsyslog.d/"]
|
|
|
|
COPY ["start.sh", "orchagent.sh", "/usr/bin/"]
|
|
|
|
COPY ["brcm.profile.ini", "/usr/share/sonic/device/vswitch/"]
|
2018-01-29 10:11:05 -06:00
|
|
|
COPY ["buffers.json.j2", "/usr/share/sonic/device/vswitch/"]
|
|
|
|
COPY ["pg_profile_lookup.ini", "/usr/share/sonic/device/vswitch/"]
|
2017-10-24 00:01:42 -05:00
|
|
|
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
|
2017-11-30 16:59:25 -06:00
|
|
|
COPY ["files/configdb-load.sh", "/usr/bin/"]
|
|
|
|
COPY ["files/arp_update", "/usr/bin"]
|
2017-10-24 00:01:42 -05:00
|
|
|
|
2017-11-13 16:38:07 -06:00
|
|
|
RUN echo "docker-sonic-vs" > /etc/hostname
|
2017-11-30 16:59:25 -06:00
|
|
|
RUN touch /etc/quagga/zebra.conf
|
2017-11-13 16:38:07 -06:00
|
|
|
|
2017-10-24 00:01:42 -05:00
|
|
|
ENTRYPOINT ["/usr/bin/supervisord"]
|