2022-03-14 05:09:20 -05:00
|
|
|
|
{% set prefix = DEFAULT_CONTAINER_REGISTRY %}
|
2021-04-18 10:17:57 -05:00
|
|
|
|
{%- if CONFIGURED_ARCH == "armhf" and MULTIARCH_QEMU_ENVIRON == "y" %}
|
2022-07-21 16:15:16 -05:00
|
|
|
|
FROM {{ prefix }}multiarch/qemu-user-static:x86_64-arm as qemu
|
2022-03-14 05:09:20 -05:00
|
|
|
|
FROM {{ prefix }}multiarch/debian-debootstrap:armhf-buster
|
2020-12-03 14:38:50 -06:00
|
|
|
|
COPY --from=qemu /usr/bin/qemu-arm-static /usr/bin
|
2021-04-18 10:17:57 -05:00
|
|
|
|
{%- elif CONFIGURED_ARCH == "arm64" and MULTIARCH_QEMU_ENVIRON == "y" %}
|
2022-07-21 16:15:16 -05:00
|
|
|
|
FROM {{ prefix }}multiarch/qemu-user-static:x86_64-aarch64 as qemu
|
2022-03-14 05:09:20 -05:00
|
|
|
|
FROM {{ prefix }}multiarch/debian-debootstrap:arm64-buster
|
2022-07-21 16:15:16 -05:00
|
|
|
|
{%- elif CONFIGURED_ARCH == "armhf" and CROSS_BUILD_ENVIRON == "y" %}
|
|
|
|
|
FROM {{ prefix }}multiarch/qemu-user-static:x86_64-arm as qemu
|
|
|
|
|
FROM {{ prefix }}debian:buster
|
|
|
|
|
COPY --from=qemu /usr/bin/qemu-arm-static /usr/bin
|
|
|
|
|
{%- elif CONFIGURED_ARCH == "arm64" and CROSS_BUILD_ENVIRON == "y" %}
|
|
|
|
|
FROM {{ prefix }}multiarch/qemu-user-static:x86_64-aarch64 as qemu
|
|
|
|
|
FROM {{ prefix }}debian:buster
|
|
|
|
|
COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin
|
2020-02-02 14:03:34 -06:00
|
|
|
|
{%- else -%}
|
2022-03-14 05:09:20 -05:00
|
|
|
|
FROM {{ prefix }}debian:buster
|
2020-02-02 14:03:34 -06:00
|
|
|
|
{%- endif %}
|
|
|
|
|
|
|
|
|
|
MAINTAINER gulv@microsoft.com
|
|
|
|
|
|
|
|
|
|
COPY ["no-check-valid-until", "/etc/apt/apt.conf.d/"]
|
|
|
|
|
|
2022-11-08 18:09:53 -06:00
|
|
|
|
{%- if CROSS_BUILD_ENVIRON != "y" %}
|
|
|
|
|
COPY ["sources.list.{{ CONFIGURED_ARCH }}", "/etc/apt/sources.list"]
|
|
|
|
|
{%- else %}
|
|
|
|
|
COPY ["sources.list.amd64", "/etc/apt/sources.list"]
|
2022-07-21 16:15:16 -05:00
|
|
|
|
{%- if CONFIGURED_ARCH == "armhf" %}
|
|
|
|
|
ARG arch=armhf
|
|
|
|
|
ARG gcc_arch=arm-linux-gnueabihf
|
|
|
|
|
ARG PYTHON_CROSS_PLATFORM=linux_armv7l
|
|
|
|
|
{%- elif CONFIGURED_ARCH == "arm64" %}
|
|
|
|
|
ARG arch=arm64
|
|
|
|
|
ARG gcc_arch=aarch64-linux-gnu
|
|
|
|
|
ARG PYTHON_CROSS_PLATFORM=linux_aarch64
|
|
|
|
|
{%- endif %}
|
|
|
|
|
|
|
|
|
|
RUN echo "deb http://ftp.debian.org/debian buster-backports main" >> /etc/apt/sources.list
|
|
|
|
|
|
|
|
|
|
RUN dpkg --add-architecture $arch
|
|
|
|
|
RUN apt-get update
|
|
|
|
|
RUN apt-get install -y crossbuild-essential-$arch
|
|
|
|
|
RUN apt-get install -y gcc-$gcc_arch
|
|
|
|
|
|
|
|
|
|
RUN apt-mark hold g++-$gcc_arch
|
|
|
|
|
RUN apt-mark hold g++-8-$gcc_arch
|
|
|
|
|
RUN apt-mark hold gcc-$gcc_arch
|
|
|
|
|
RUN apt-mark hold gcc-8-$gcc_arch
|
|
|
|
|
|
|
|
|
|
ARG CROSS_CC=${gcc_arch}-gcc
|
|
|
|
|
ARG CROSS_CXX=${gcc_arch}-g++
|
2020-02-02 14:03:34 -06:00
|
|
|
|
{%- endif %}
|
|
|
|
|
|
|
|
|
|
## Make apt-get non-interactive
|
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
|
2022-07-21 16:15:16 -05:00
|
|
|
|
{%- if CROSS_BUILD_ENVIRON == "y" %}
|
|
|
|
|
RUN apt-get install -y python3 python3-pip
|
|
|
|
|
RUN apt-get install -y python:$arch python3-minimal:$arch python3.7:$arch python3:$arch python-setuptools:$arch
|
|
|
|
|
RUN apt-get download python3-distutils && dpkg --force-all -i python3-distutils*
|
|
|
|
|
RUN apt-get download python3-pip && dpkg --force-all -i python3-pip*
|
|
|
|
|
RUN which pip3 && pip3 install enum34
|
|
|
|
|
RUN pip3 install virtualenv
|
|
|
|
|
|
|
|
|
|
# Create target arm python2/3 virtual environments with all required packages installed
|
|
|
|
|
RUN mkdir /python_virtualenv
|
|
|
|
|
RUN cd /python_virtualenv && python3 -m virtualenv -p /usr/bin/python env2
|
|
|
|
|
RUN cd /python_virtualenv && python3 -m virtualenv --copies -p /usr/bin/python3 env3
|
|
|
|
|
|
|
|
|
|
RUN PATH=/python_virtualenv/env2/bin/:$PATH pip2 install setuptools==40.8.0 wheel==0.35.1 fastentrypoints pytest pytest-cov pytest-runner==4.4 nose==1.3.7 mockredispy==2.9.3 mock==3.0.5 j2cli==0.3.10 PyYAML==5.4.1 pexpect==4.6.0 Pympler==0.8 ctypesgen==1.0.2 natsort==6.2.1 redis==3.5.3 protobuf==3.17.3
|
|
|
|
|
RUN PATH=/python_virtualenv/env3/bin/:$PATH pip3 install setuptools==49.6.00 wheel==0.35.1 fastentrypoints pytest pytest-cov pytest-runner==5.2 nose==1.3.7 mockredispy==2.9.3 mock==3.0.5 PyYAML==5.4.1 redis==3.5.3 pexpect==4.8.0 Pympler==0.8 parameterized natsort==6.2.1 MarkupSafe==2.0.1 Jinja2==3.0.3 sphinx && ln -s /python_virtualenv/env3/bin/pytest /python_virtualenv/env3/bin/pytest-3
|
|
|
|
|
|
|
|
|
|
RUN apt-get --fix-broken install -y
|
|
|
|
|
RUN LIBPYTHON3_DEPS="`apt-cache depends libpython3-dev:$arch |grep Depends|awk {'print \$2;'}|tr "\n" " "`" && apt-get install -y libpython2.7-dev:$arch $LIBPYTHON3_DEPS libxml2-dev:$arch libxslt-dev:$arch libssl-dev:$arch libz-dev:$arch
|
|
|
|
|
|
|
|
|
|
RUN apt-get install -y swig libssl-dev
|
|
|
|
|
|
|
|
|
|
RUN PATH=/python_virtualenv/env3/bin/:$PATH python3 -m pip install pyang==2.4.0
|
|
|
|
|
RUN PATH=/python_virtualenv/env3/bin/:$PATH python3 -m pip install pyangbind==0.8.1
|
|
|
|
|
RUN PATH=/python_virtualenv/env3/bin/:$PATH python3 -m pip uninstall -y enum34
|
|
|
|
|
RUN PATH=/python_virtualenv/env3/bin/:$PATH pip3 install --force-reinstall --no-cache-dir coverage
|
|
|
|
|
{%- endif %}
|
|
|
|
|
|
2020-02-02 14:03:34 -06:00
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
|
|
apt-utils \
|
|
|
|
|
default-jre-headless \
|
|
|
|
|
openssh-server \
|
|
|
|
|
curl \
|
|
|
|
|
wget \
|
|
|
|
|
unzip \
|
|
|
|
|
git \
|
|
|
|
|
build-essential \
|
|
|
|
|
libtool \
|
|
|
|
|
lintian \
|
|
|
|
|
sudo \
|
|
|
|
|
dh-make \
|
|
|
|
|
dh-exec \
|
|
|
|
|
kmod \
|
|
|
|
|
libtinyxml2-6a \
|
|
|
|
|
libtinyxml2-dev \
|
|
|
|
|
python \
|
|
|
|
|
python-pip \
|
2020-11-09 20:13:08 -06:00
|
|
|
|
python3 \
|
2020-10-26 15:48:50 -05:00
|
|
|
|
python3-pip \
|
2020-02-02 14:03:34 -06:00
|
|
|
|
libncurses5-dev \
|
|
|
|
|
texinfo \
|
|
|
|
|
dh-autoreconf \
|
|
|
|
|
doxygen \
|
|
|
|
|
devscripts \
|
|
|
|
|
git-buildpackage \
|
|
|
|
|
perl-modules \
|
|
|
|
|
libswitch-perl \
|
|
|
|
|
dh-systemd \
|
2020-10-01 04:16:47 -05:00
|
|
|
|
libzmq5 \
|
|
|
|
|
libzmq3-dev \
|
2022-08-04 12:17:38 -05:00
|
|
|
|
uuid-dev \
|
2021-04-26 15:51:50 -05:00
|
|
|
|
jq \
|
2020-02-02 14:03:34 -06:00
|
|
|
|
# For quagga build
|
|
|
|
|
libreadline-dev \
|
|
|
|
|
texlive-latex-base \
|
|
|
|
|
texlive-generic-recommended \
|
|
|
|
|
texlive-fonts-recommended \
|
|
|
|
|
libpam0g-dev \
|
|
|
|
|
libpam-dev \
|
|
|
|
|
libcap-dev \
|
|
|
|
|
imagemagick \
|
|
|
|
|
ghostscript \
|
|
|
|
|
groff \
|
2022-05-24 16:47:09 -05:00
|
|
|
|
libpcre2-dev \
|
2020-02-02 14:03:34 -06:00
|
|
|
|
gawk \
|
|
|
|
|
chrpath \
|
|
|
|
|
# For frr build
|
|
|
|
|
libc-ares-dev \
|
|
|
|
|
libsnmp-dev \
|
|
|
|
|
libjson-c3 \
|
|
|
|
|
libjson-c-dev \
|
|
|
|
|
libsystemd-dev \
|
|
|
|
|
python-ipaddr \
|
|
|
|
|
libcmocka-dev \
|
2022-07-21 16:15:16 -05:00
|
|
|
|
{%- if CROSS_BUILD_ENVIRON != "y" %}
|
2020-02-02 14:03:34 -06:00
|
|
|
|
python3-all-dev \
|
|
|
|
|
python3-all-dbg \
|
2022-07-21 16:15:16 -05:00
|
|
|
|
{%- endif %}
|
2020-02-02 14:03:34 -06:00
|
|
|
|
install-info \
|
|
|
|
|
logrotate \
|
|
|
|
|
# For libnl3 (local) build
|
|
|
|
|
cdbs \
|
|
|
|
|
# For SAI meta build
|
|
|
|
|
libxml-simple-perl \
|
|
|
|
|
graphviz \
|
|
|
|
|
aspell \
|
2022-02-08 04:56:34 -06:00
|
|
|
|
# For SAI meta rpc build - make rpc
|
|
|
|
|
libgetopt-long-descriptive-perl \
|
|
|
|
|
libconst-fast-perl \
|
|
|
|
|
libtemplate-perl \
|
|
|
|
|
libnamespace-autoclean-perl \
|
|
|
|
|
libmoose-perl \
|
|
|
|
|
libmoosex-aliases-perl \
|
2020-02-02 14:03:34 -06:00
|
|
|
|
# For linux build
|
|
|
|
|
bc \
|
|
|
|
|
fakeroot \
|
|
|
|
|
build-essential \
|
|
|
|
|
devscripts \
|
|
|
|
|
quilt \
|
|
|
|
|
stgit \
|
2022-04-19 00:23:15 -05:00
|
|
|
|
sbsigntool \
|
2020-02-02 14:03:34 -06:00
|
|
|
|
# For platform-modules build
|
|
|
|
|
module-assistant \
|
|
|
|
|
# For thrift build\
|
|
|
|
|
gem2deb \
|
|
|
|
|
libevent-dev \
|
|
|
|
|
libglib2.0-dev \
|
|
|
|
|
libqt4-dev \
|
|
|
|
|
python-all-dev \
|
|
|
|
|
python-twisted \
|
|
|
|
|
phpunit \
|
|
|
|
|
libbit-vector-perl \
|
|
|
|
|
openjdk-11-jdk \
|
|
|
|
|
javahelper \
|
|
|
|
|
maven-debian-helper \
|
|
|
|
|
ant \
|
|
|
|
|
libhttpclient-java \
|
|
|
|
|
libslf4j-java \
|
|
|
|
|
libservlet3.1-java \
|
|
|
|
|
qt5-default \
|
|
|
|
|
pkg-php-tools \
|
|
|
|
|
# For mellanox sdk build
|
|
|
|
|
libpcre3 \
|
|
|
|
|
libpcre3-dev \
|
|
|
|
|
byacc \
|
|
|
|
|
flex \
|
|
|
|
|
libglib2.0-dev \
|
|
|
|
|
bison \
|
|
|
|
|
expat \
|
|
|
|
|
libexpat1-dev \
|
|
|
|
|
dpatch \
|
|
|
|
|
libdb-dev \
|
|
|
|
|
iptables-dev \
|
|
|
|
|
ctags \
|
|
|
|
|
# For mellanox sai build
|
|
|
|
|
libtool-bin \
|
|
|
|
|
libxml2-dev \
|
|
|
|
|
# For BFN sdk build
|
|
|
|
|
libusb-1.0-0-dev \
|
|
|
|
|
libcurl3-nss-dev \
|
|
|
|
|
libunwind8-dev \
|
|
|
|
|
telnet \
|
|
|
|
|
libc-ares2 \
|
|
|
|
|
libgoogle-perftools4 \
|
|
|
|
|
# For build image
|
|
|
|
|
cpio \
|
|
|
|
|
squashfs-tools \
|
|
|
|
|
zip \
|
|
|
|
|
# For broadcom sdk build
|
|
|
|
|
{%- if CONFIGURED_ARCH == "amd64" %}
|
|
|
|
|
linux-compiler-gcc-8-x86 \
|
|
|
|
|
{%- endif %}
|
2022-07-21 16:15:16 -05:00
|
|
|
|
{%- if CONFIGURED_ARCH == "armhf" and CROSS_BUILD_ENVIRON != "y" %}
|
2020-02-02 14:03:34 -06:00
|
|
|
|
linux-compiler-gcc-8-arm \
|
|
|
|
|
{%- endif %}
|
|
|
|
|
linux-kbuild-4.19 \
|
|
|
|
|
# teamd build
|
|
|
|
|
libdaemon-dev \
|
|
|
|
|
libdbus-1-dev \
|
|
|
|
|
libjansson-dev \
|
|
|
|
|
# For cavium sdk build
|
|
|
|
|
libpcap-dev \
|
|
|
|
|
dnsutils \
|
|
|
|
|
libusb-dev \
|
|
|
|
|
# For debian image reconfiguration
|
|
|
|
|
augeas-tools \
|
|
|
|
|
# For p4 build
|
|
|
|
|
libyaml-dev \
|
|
|
|
|
libevent-dev \
|
|
|
|
|
libjudy-dev \
|
|
|
|
|
libedit-dev \
|
|
|
|
|
libnanomsg-dev \
|
|
|
|
|
python-stdeb \
|
|
|
|
|
# For redis build
|
|
|
|
|
libjemalloc-dev \
|
|
|
|
|
liblua5.1-0-dev \
|
|
|
|
|
lua-bitop-dev \
|
|
|
|
|
lua-cjson-dev \
|
|
|
|
|
# For mft kernel module build
|
|
|
|
|
dkms \
|
|
|
|
|
# For Jenkins static analysis, unit testing and code coverage
|
|
|
|
|
cppcheck \
|
|
|
|
|
clang \
|
|
|
|
|
pylint \
|
|
|
|
|
python-pytest \
|
2020-08-24 12:35:22 -05:00
|
|
|
|
python3-pytest \
|
2020-02-02 14:03:34 -06:00
|
|
|
|
gcovr \
|
|
|
|
|
python-pytest-cov \
|
2020-08-24 12:35:22 -05:00
|
|
|
|
python3-pytest-cov \
|
2020-02-02 14:03:34 -06:00
|
|
|
|
python-parse \
|
|
|
|
|
# For snmpd
|
|
|
|
|
default-libmysqlclient-dev \
|
|
|
|
|
libssl-dev \
|
|
|
|
|
libperl-dev \
|
|
|
|
|
libpci-dev \
|
|
|
|
|
libpci3 \
|
|
|
|
|
libsensors5 \
|
|
|
|
|
libsensors4-dev \
|
|
|
|
|
libwrap0-dev \
|
|
|
|
|
# For lldpd
|
|
|
|
|
debhelper \
|
|
|
|
|
autotools-dev \
|
|
|
|
|
libbsd-dev \
|
|
|
|
|
pkg-config \
|
|
|
|
|
check \
|
|
|
|
|
# For mpdecimal
|
|
|
|
|
docutils-common \
|
|
|
|
|
libjs-sphinxdoc \
|
|
|
|
|
libjs-underscore \
|
|
|
|
|
python-docutils \
|
|
|
|
|
python-jinja2 \
|
|
|
|
|
python-markupsafe \
|
|
|
|
|
python-pygments \
|
|
|
|
|
python-roman \
|
|
|
|
|
python-sphinx \
|
|
|
|
|
sphinx-common \
|
|
|
|
|
python3-sphinx \
|
|
|
|
|
# For sonic config engine testing
|
2020-09-28 21:20:15 -05:00
|
|
|
|
python-dev \
|
2020-12-15 10:44:46 -06:00
|
|
|
|
{%- if CONFIGURED_ARCH == "armhf" or CONFIGURED_ARCH == "arm64" %}
|
|
|
|
|
libxslt-dev \
|
|
|
|
|
{%- endif %}
|
2020-02-02 14:03:34 -06:00
|
|
|
|
# For lockfile
|
|
|
|
|
procmail \
|
|
|
|
|
# For gtest
|
|
|
|
|
libgtest-dev \
|
|
|
|
|
cmake \
|
2021-10-28 14:14:21 -05:00
|
|
|
|
# For gmock
|
|
|
|
|
libgmock-dev \
|
2020-02-02 14:03:34 -06:00
|
|
|
|
# For pam_tacplus build
|
|
|
|
|
autoconf-archive \
|
|
|
|
|
# For iproute2
|
|
|
|
|
cm-super-minimal \
|
|
|
|
|
libatm1-dev \
|
|
|
|
|
libelf-dev \
|
|
|
|
|
libmnl-dev \
|
|
|
|
|
libselinux1-dev \
|
|
|
|
|
linuxdoc-tools \
|
|
|
|
|
lynx \
|
|
|
|
|
texlive-latex-extra \
|
|
|
|
|
texlive-latex-recommended \
|
|
|
|
|
iproute2 \
|
|
|
|
|
# For bash
|
|
|
|
|
texi2html \
|
2021-10-11 02:20:51 -05:00
|
|
|
|
sharutils \
|
|
|
|
|
locales \
|
|
|
|
|
time \
|
|
|
|
|
man2html-base \
|
|
|
|
|
libcunit1 \
|
|
|
|
|
libcunit1-dev \
|
2020-02-02 14:03:34 -06:00
|
|
|
|
# For initramfs
|
2020-02-03 22:19:44 -06:00
|
|
|
|
shellcheck \
|
2020-02-02 14:03:34 -06:00
|
|
|
|
bash-completion \
|
|
|
|
|
{%- if CONFIGURED_ARCH == "amd64" %}
|
|
|
|
|
# For sonic vs image build
|
|
|
|
|
dosfstools \
|
|
|
|
|
qemu-kvm \
|
|
|
|
|
libvirt-clients \
|
|
|
|
|
{%- endif %}
|
2020-12-02 17:02:50 -06:00
|
|
|
|
# For ntp
|
|
|
|
|
autogen \
|
|
|
|
|
libopts25-dev \
|
|
|
|
|
pps-tools \
|
|
|
|
|
dh-apparmor \
|
2020-02-02 14:03:34 -06:00
|
|
|
|
# For lm-sensors
|
|
|
|
|
librrd8 \
|
|
|
|
|
librrd-dev \
|
|
|
|
|
rrdtool \
|
|
|
|
|
# For kdump-tools
|
|
|
|
|
liblzo2-dev \
|
|
|
|
|
# For iptables
|
|
|
|
|
libnetfilter-conntrack-dev \
|
|
|
|
|
libnftnl-dev \
|
|
|
|
|
# For SAI3.7
|
2020-05-30 15:44:19 -05:00
|
|
|
|
protobuf-compiler \
|
2020-02-02 14:03:34 -06:00
|
|
|
|
libprotobuf-dev \
|
2020-05-30 15:44:19 -05:00
|
|
|
|
xxd \
|
2020-02-02 14:03:34 -06:00
|
|
|
|
# For DHCP Monitor tool
|
|
|
|
|
libexplain-dev \
|
2020-06-09 02:25:17 -05:00
|
|
|
|
libevent-dev \
|
2020-07-29 16:19:03 -05:00
|
|
|
|
# For libyang
|
|
|
|
|
swig \
|
2020-08-06 05:16:11 -05:00
|
|
|
|
# For build dtb
|
2020-10-26 15:48:50 -05:00
|
|
|
|
device-tree-compiler \
|
|
|
|
|
# For sonic-mgmt-framework
|
|
|
|
|
autoconf \
|
|
|
|
|
m4 \
|
|
|
|
|
libxml2-utils \
|
|
|
|
|
xsltproc \
|
|
|
|
|
python-lxml \
|
2021-01-10 12:39:59 -06:00
|
|
|
|
libexpat1-dev \
|
2021-06-02 21:38:21 -05:00
|
|
|
|
libcurl3-gnutls \
|
|
|
|
|
libcjson-dev \
|
2021-01-10 12:39:59 -06:00
|
|
|
|
# For WPA supplication
|
|
|
|
|
qtbase5-dev \
|
|
|
|
|
aspell-en \
|
2022-07-21 16:15:16 -05:00
|
|
|
|
{%- if CROSS_BUILD_ENVIRON != "y" %}
|
|
|
|
|
libhiredis-dev \
|
|
|
|
|
{%- endif %}
|
2021-01-10 12:39:59 -06:00
|
|
|
|
swig3.0 \
|
|
|
|
|
libpython2.7-dev \
|
|
|
|
|
libssl-dev \
|
|
|
|
|
dbus \
|
|
|
|
|
libdbus-1-dev \
|
|
|
|
|
libdbus-glib-1-2 \
|
|
|
|
|
libdbus-glib-1-dev \
|
|
|
|
|
libreadline-dev \
|
|
|
|
|
libncurses5-dev \
|
|
|
|
|
libpcsclite-dev \
|
|
|
|
|
docbook-to-man \
|
2021-01-14 12:25:40 -06:00
|
|
|
|
docbook-utils \
|
|
|
|
|
# For kdump-tools
|
2021-01-23 02:29:35 -06:00
|
|
|
|
libbz2-dev \
|
|
|
|
|
# For linkmgrd
|
|
|
|
|
libboost1.71-dev \
|
2022-08-04 12:17:38 -05:00
|
|
|
|
libboost-serialization1.71-dev \
|
2021-01-23 02:29:35 -06:00
|
|
|
|
libboost-program-options1.71-dev \
|
|
|
|
|
libboost-system1.71-dev \
|
|
|
|
|
libboost-thread1.71-dev \
|
|
|
|
|
libboost-atomic1.71-dev \
|
|
|
|
|
libboost-chrono1.71-dev \
|
|
|
|
|
libboost-container1.71-dev \
|
|
|
|
|
libboost-context1.71-dev \
|
|
|
|
|
libboost-contract1.71-dev \
|
|
|
|
|
libboost-coroutine1.71-dev \
|
|
|
|
|
libboost-date-time1.71-dev \
|
|
|
|
|
libboost-fiber1.71-dev \
|
|
|
|
|
libboost-filesystem1.71-dev \
|
|
|
|
|
libboost-graph-parallel1.71-dev \
|
|
|
|
|
libboost-log1.71-dev \
|
|
|
|
|
libboost-regex1.71-dev \
|
|
|
|
|
googletest \
|
|
|
|
|
libgtest-dev \
|
2022-04-13 19:59:54 -05:00
|
|
|
|
libgmock-dev \
|
2021-02-08 21:35:08 -06:00
|
|
|
|
libgcc-8-dev \
|
|
|
|
|
# For sonic-host-services build
|
|
|
|
|
libcairo2-dev \
|
|
|
|
|
libdbus-1-dev \
|
|
|
|
|
libgirepository1.0-dev \
|
|
|
|
|
libsystemd-dev \
|
2021-11-30 21:50:09 -06:00
|
|
|
|
pkg-config \
|
|
|
|
|
# For audisp-tacplus
|
|
|
|
|
libauparse-dev \
|
|
|
|
|
auditd
|
2020-02-02 14:03:34 -06:00
|
|
|
|
|
2021-11-25 07:38:17 -06:00
|
|
|
|
# For iproute2
|
|
|
|
|
RUN apt-get install -y -t buster-backports \
|
|
|
|
|
libbpf-dev \
|
|
|
|
|
dwz \
|
|
|
|
|
debhelper
|
|
|
|
|
|
2022-07-21 16:15:16 -05:00
|
|
|
|
{%- if CROSS_BUILD_ENVIRON == "y" %}
|
|
|
|
|
# Arm vs. amd64 versions conflict - remove amd64 packages
|
|
|
|
|
RUN apt-get remove -y libnl-3-200 libsnmp30
|
|
|
|
|
RUN apt-get install -y libpcre2-dev:$arch libpcre3:$arch
|
|
|
|
|
{%- endif %}
|
|
|
|
|
|
2021-08-09 15:48:18 -05:00
|
|
|
|
RUN apt-get -y build-dep openssh
|
|
|
|
|
|
2020-12-18 00:09:40 -06:00
|
|
|
|
# Build fix for ARMHF buster libsairedis
|
2022-07-21 16:15:16 -05:00
|
|
|
|
{%- if CONFIGURED_ARCH == "armhf" and MULTIARCH_QEMU_ENVIRON == "y" %}
|
2020-12-18 00:09:40 -06:00
|
|
|
|
# Install doxygen build dependency packages
|
|
|
|
|
RUN apt install -y libxapian-dev yui-compressor libclang-3.9-dev texlive-extra-utils \
|
|
|
|
|
texlive-font-utils rdfind llvm-6.0-dev libclang-6.0-dev sassc
|
|
|
|
|
# Update doxygen with 64bit file offset patch
|
|
|
|
|
RUN dget -u http://deb.debian.org/debian/pool/main/d/doxygen/doxygen_1.8.13-10.dsc && \
|
|
|
|
|
cd doxygen-1.8.13 && \
|
|
|
|
|
sed -i '56 a add_definitions(-D_FILE_OFFSET_BITS=64)' CMakeLists.txt && \
|
|
|
|
|
DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -us -uc -b && \
|
|
|
|
|
cd .. && \
|
|
|
|
|
dpkg -i ./doxygen_1.8.13-10_armhf.deb && \
|
|
|
|
|
rm -fr doxygen*
|
2020-12-19 13:50:10 -06:00
|
|
|
|
|
|
|
|
|
# Aspell is unable to locate the language dictionaries.
|
|
|
|
|
# Re-installing aspell-en dictionary to fix it.
|
|
|
|
|
RUN apt-get install --reinstall -y aspell-en
|
2021-05-07 00:10:41 -05:00
|
|
|
|
|
|
|
|
|
# workaround because of https://bugs.launchpad.net/qemu/+bug/1805913, just disable aspell
|
|
|
|
|
RUN cp /bin/true /usr/bin/aspell
|
2020-12-18 00:09:40 -06:00
|
|
|
|
{%- endif %}
|
|
|
|
|
|
2020-02-02 14:03:34 -06:00
|
|
|
|
## Config dpkg
|
|
|
|
|
## install the configuration file if it’s currently missing
|
|
|
|
|
RUN sudo augtool --autosave "set /files/etc/dpkg/dpkg.cfg/force-confmiss"
|
|
|
|
|
## combined with confold: overwrite configuration files that you have not modified
|
|
|
|
|
RUN sudo augtool --autosave "set /files/etc/dpkg/dpkg.cfg/force-confdef"
|
|
|
|
|
## do not modify the current configuration file, the new version is installed with a .dpkg-dist suffix
|
|
|
|
|
RUN sudo augtool --autosave "set /files/etc/dpkg/dpkg.cfg/force-confold"
|
|
|
|
|
|
2022-07-21 16:15:16 -05:00
|
|
|
|
{%- if CROSS_BUILD_ENVIRON != "y" %}
|
2020-02-02 14:03:34 -06:00
|
|
|
|
# For linux build
|
|
|
|
|
RUN apt-get -y build-dep linux
|
2022-07-21 16:15:16 -05:00
|
|
|
|
{%- else %}
|
|
|
|
|
RUN apt-get install -y kernel-wedge
|
|
|
|
|
{%- endif %}
|
2020-02-02 14:03:34 -06:00
|
|
|
|
|
|
|
|
|
# For gobgp and telemetry build
|
2020-05-04 17:00:07 -05:00
|
|
|
|
RUN export VERSION=1.14.2 \
|
2022-07-21 16:15:16 -05:00
|
|
|
|
{%- if CONFIGURED_ARCH == "armhf" and CROSS_BUILD_ENVIRON != "y" %}
|
2020-02-02 14:03:34 -06:00
|
|
|
|
&& wget https://storage.googleapis.com/golang/go$VERSION.linux-armv6l.tar.gz \
|
|
|
|
|
&& tar -C /usr/local -xzf go$VERSION.linux-armv6l.tar.gz \
|
2022-07-21 16:15:16 -05:00
|
|
|
|
{%- elif CONFIGURED_ARCH == "arm64" and CROSS_BUILD_ENVIRON != "y" %}
|
2020-02-02 14:03:34 -06:00
|
|
|
|
&& wget https://storage.googleapis.com/golang/go$VERSION.linux-arm64.tar.gz \
|
|
|
|
|
&& tar -C /usr/local -xzf go$VERSION.linux-arm64.tar.gz \
|
|
|
|
|
{%- else %}
|
|
|
|
|
&& wget https://storage.googleapis.com/golang/go$VERSION.linux-amd64.tar.gz \
|
|
|
|
|
&& tar -C /usr/local -xzf go$VERSION.linux-amd64.tar.gz \
|
|
|
|
|
{%- endif %}
|
|
|
|
|
&& echo 'export GOROOT=/usr/local/go' >> /etc/bash.bashrc \
|
|
|
|
|
&& echo 'export PATH=$PATH:$GOROOT/bin' >> /etc/bash.bashrc \
|
|
|
|
|
&& rm go$VERSION.linux-*.tar.gz
|
|
|
|
|
|
2020-10-26 15:48:50 -05:00
|
|
|
|
RUN pip3 install --upgrade pip
|
2020-12-25 23:29:25 -06:00
|
|
|
|
RUN pip2 install --upgrade 'pip<21'
|
2021-02-08 21:35:08 -06:00
|
|
|
|
RUN apt-get purge -y python-pip python3-pip python3-yaml
|
2020-10-26 15:48:50 -05:00
|
|
|
|
|
2020-08-24 12:35:22 -05:00
|
|
|
|
# For building Python packages
|
2020-10-26 15:48:50 -05:00
|
|
|
|
RUN pip2 install setuptools==40.8.0
|
2020-12-11 01:18:58 -06:00
|
|
|
|
RUN pip2 install wheel==0.35.1
|
2020-08-24 12:35:22 -05:00
|
|
|
|
RUN pip3 install setuptools==49.6.00
|
2020-12-11 01:18:58 -06:00
|
|
|
|
RUN pip3 install wheel==0.35.1
|
2020-08-24 12:35:22 -05:00
|
|
|
|
|
2020-10-14 12:16:35 -05:00
|
|
|
|
# For building sonic-utilities
|
2020-10-26 15:48:50 -05:00
|
|
|
|
RUN pip2 install fastentrypoints
|
2020-10-14 12:16:35 -05:00
|
|
|
|
RUN pip3 install fastentrypoints
|
|
|
|
|
|
2020-08-24 12:35:22 -05:00
|
|
|
|
# For running Python unit tests
|
2020-10-26 15:48:50 -05:00
|
|
|
|
RUN pip2 install pytest-runner==4.4
|
2020-08-24 12:35:22 -05:00
|
|
|
|
RUN pip3 install pytest-runner==5.2
|
2021-04-09 18:58:00 -05:00
|
|
|
|
RUN pip2 install nose==1.3.7
|
|
|
|
|
RUN pip3 install nose==1.3.7
|
2020-10-26 15:48:50 -05:00
|
|
|
|
RUN pip2 install mockredispy==2.9.3
|
2020-08-24 12:35:22 -05:00
|
|
|
|
RUN pip3 install mockredispy==2.9.3
|
|
|
|
|
|
|
|
|
|
# For Python 2 unit tests, we need 'mock'. The last version of 'mock'
|
|
|
|
|
# which supports Python 2 is 3.0.5. In Python 3, 'mock' is part of 'unittest'
|
|
|
|
|
# in the standard library
|
2020-10-26 15:48:50 -05:00
|
|
|
|
RUN pip2 install mock==3.0.5
|
2020-08-24 12:35:22 -05:00
|
|
|
|
|
2020-02-02 14:03:34 -06:00
|
|
|
|
# For p4 build
|
2020-10-26 15:48:50 -05:00
|
|
|
|
RUN pip2 install \
|
|
|
|
|
ctypesgen==1.0.2 \
|
|
|
|
|
crc16
|
2020-02-02 14:03:34 -06:00
|
|
|
|
|
|
|
|
|
# For sonic config engine testing
|
2020-09-28 21:20:15 -05:00
|
|
|
|
# Install pyangbind here, outside sonic-config-engine dependencies, as pyangbind causes enum34 to be installed.
|
|
|
|
|
# enum34 causes Python 're' package to not work properly as it redefines an incompatible enum.py module
|
|
|
|
|
# https://github.com/robshakir/pyangbind/issues/232
|
|
|
|
|
RUN pip3 install pyangbind==0.8.1
|
|
|
|
|
RUN pip3 uninstall -y enum34
|
2020-02-02 14:03:34 -06:00
|
|
|
|
|
|
|
|
|
# For templating
|
2020-10-26 15:48:50 -05:00
|
|
|
|
RUN pip2 install j2cli==0.3.10
|
2022-02-24 19:00:13 -06:00
|
|
|
|
# Note: Jinja2 depends on MarkupSafe, however markupsafe 2.1.0 breaks Jinja2 2.10
|
|
|
|
|
# Debian buster dist-packages include python3-markupsafe (1.1.0-1) and python3-jinja2 (2.10-2)
|
|
|
|
|
# If not pinning the versions, any requirement like `MarkupSafe>=2.0` will pull latest into site-packages and mess up.
|
|
|
|
|
RUN pip3 install MarkupSafe==2.0.1
|
|
|
|
|
RUN pip3 install Jinja2==3.0.3
|
2020-02-02 14:03:34 -06:00
|
|
|
|
|
2020-10-26 15:48:50 -05:00
|
|
|
|
# For sonic-mgmt-framework
|
2021-01-28 12:46:56 -06:00
|
|
|
|
RUN pip2 install "PyYAML==5.4.1"
|
|
|
|
|
RUN pip3 install "PyYAML==5.4.1"
|
2022-07-21 16:15:16 -05:00
|
|
|
|
|
|
|
|
|
{%- if CROSS_BUILD_ENVIRON != "y" %}
|
2021-12-15 19:55:55 -06:00
|
|
|
|
RUN pip2 install "lxml==4.6.5"
|
|
|
|
|
RUN pip3 install "lxml==4.6.5"
|
2022-07-21 16:15:16 -05:00
|
|
|
|
{%- endif %}
|
2020-02-02 14:03:34 -06:00
|
|
|
|
|
|
|
|
|
# For sonic-platform-common testing
|
2022-01-09 20:24:07 -06:00
|
|
|
|
RUN pip3 install redis
|
2020-02-02 14:03:34 -06:00
|
|
|
|
|
|
|
|
|
# For vs image build
|
2020-10-26 15:48:50 -05:00
|
|
|
|
RUN pip2 install pexpect==4.6.0
|
2020-11-09 20:13:08 -06:00
|
|
|
|
RUN pip3 install pexpect==4.8.0
|
2020-02-02 14:03:34 -06:00
|
|
|
|
|
2020-05-27 04:21:58 -05:00
|
|
|
|
# For sonic-swss-common testing
|
2020-10-26 15:48:50 -05:00
|
|
|
|
RUN pip2 install Pympler==0.8
|
2020-11-09 20:13:08 -06:00
|
|
|
|
RUN pip3 install Pympler==0.8
|
2020-05-27 04:21:58 -05:00
|
|
|
|
|
2020-11-07 15:03:41 -06:00
|
|
|
|
# For sonic_yang_model build
|
2021-04-26 23:53:23 -05:00
|
|
|
|
RUN pip3 install pyang==2.4.0
|
2020-04-15 04:51:31 -05:00
|
|
|
|
|
2020-02-02 14:03:34 -06:00
|
|
|
|
# For mgmt-framework build
|
2020-12-22 14:06:28 -06:00
|
|
|
|
RUN pip2 install mmh3==2.5.1
|
|
|
|
|
RUN pip3 install mmh3==2.5.1
|
|
|
|
|
|
2020-05-20 22:33:50 -05:00
|
|
|
|
RUN apt-get install -y xsltproc
|
2020-02-02 14:03:34 -06:00
|
|
|
|
|
|
|
|
|
# Install dependencies for isc-dhcp-relay build
|
|
|
|
|
RUN apt-get -y build-dep isc-dhcp
|
|
|
|
|
|
|
|
|
|
# Install vim
|
|
|
|
|
RUN apt-get install -y vim
|
|
|
|
|
|
|
|
|
|
# Install rsyslog
|
|
|
|
|
RUN apt-get install -y rsyslog
|
|
|
|
|
|
2022-07-21 16:15:16 -05:00
|
|
|
|
{%- if CROSS_BUILD_ENVIRON == "y" %}
|
|
|
|
|
RUN cd /usr/src/gtest && CXX=$CROSS_CXX CC=$CROSS_CC cmake . && make -C /usr/src/gtest
|
|
|
|
|
{%- else %}
|
2020-02-02 14:03:34 -06:00
|
|
|
|
RUN cd /usr/src/gtest && cmake . && make -C /usr/src/gtest
|
2022-07-21 16:15:16 -05:00
|
|
|
|
{%- endif %}
|
2020-02-02 14:03:34 -06:00
|
|
|
|
|
|
|
|
|
RUN mkdir /var/run/sshd
|
|
|
|
|
EXPOSE 22
|
|
|
|
|
|
|
|
|
|
# Install depot-tools (for git-retry)
|
|
|
|
|
RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git /usr/share/depot_tools
|
|
|
|
|
ENV PATH /usr/share/depot_tools:$PATH
|
|
|
|
|
|
2021-09-24 00:01:26 -05:00
|
|
|
|
# Install dependencies for dhcp relay test
|
|
|
|
|
RUN pip3 install parameterized==0.8.1
|
|
|
|
|
RUN pip3 install pyfakefs
|
|
|
|
|
|
2020-02-02 14:03:34 -06:00
|
|
|
|
# Install docker engine 17.03.2~ce-0 inside docker and enable experimental feature
|
|
|
|
|
RUN apt-get update
|
|
|
|
|
RUN apt-get install -y \
|
|
|
|
|
apt-transport-https \
|
|
|
|
|
ca-certificates \
|
|
|
|
|
curl \
|
|
|
|
|
gnupg2 \
|
|
|
|
|
software-properties-common
|
2020-11-11 20:19:48 -06:00
|
|
|
|
{%- if CONFIGURED_ARCH == "armhf" %}
|
|
|
|
|
RUN update-ca-certificates --fresh
|
|
|
|
|
{%- endif %}
|
2020-02-02 14:03:34 -06:00
|
|
|
|
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
|
|
|
|
|
RUN add-apt-repository \
|
2022-07-21 16:15:16 -05:00
|
|
|
|
{%- if CROSS_BUILD_ENVIRON == "y" %}
|
|
|
|
|
"deb https://download.docker.com/linux/debian \
|
|
|
|
|
{%- else %}
|
2020-02-02 14:03:34 -06:00
|
|
|
|
"deb [arch={{ CONFIGURED_ARCH }}] https://download.docker.com/linux/debian \
|
2022-07-21 16:15:16 -05:00
|
|
|
|
{%- endif %}
|
2020-02-02 14:03:34 -06:00
|
|
|
|
$(lsb_release -cs) \
|
|
|
|
|
stable"
|
|
|
|
|
RUN apt-get update
|
2022-12-01 18:28:45 -06:00
|
|
|
|
RUN apt-get install -y docker-ce=5:20.10.21~3-0~debian-buster docker-ce-cli=5:20.10.21~3-0~debian-buster
|
2021-06-08 10:24:35 -05:00
|
|
|
|
RUN echo "DOCKER_OPTS=\"--experimental --storage-driver=vfs {{ DOCKER_EXTRA_OPTS }}\"" >> /etc/default/docker
|
2020-04-13 23:13:15 -05:00
|
|
|
|
RUN update-alternatives --set iptables /usr/sbin/iptables-legacy
|
2020-06-09 02:25:17 -05:00
|
|
|
|
|
2020-12-08 18:25:54 -06:00
|
|
|
|
# Install m2crypto package, needed by SWI tools
|
|
|
|
|
RUN pip2 install m2crypto==0.36.0
|
|
|
|
|
|
2020-06-09 02:25:17 -05:00
|
|
|
|
# Install swi tools
|
2021-01-13 10:32:22 -06:00
|
|
|
|
RUN pip3 install git+https://github.com/aristanetworks/swi-tools.git@bead66bf261770237f7dd21ace3774ba04a017e9
|
2020-12-28 21:43:53 -06:00
|
|
|
|
|
|
|
|
|
{% if CONFIGURED_ARCH != "amd64" -%}
|
|
|
|
|
# Install node.js for azure pipeline
|
2021-01-17 00:04:19 -06:00
|
|
|
|
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
|
|
|
|
|
RUN apt-get install -y nodejs
|
2020-12-28 21:43:53 -06:00
|
|
|
|
|
2022-07-21 16:15:16 -05:00
|
|
|
|
{%- if CROSS_BUILD_ENVIRON == "y" %}
|
|
|
|
|
RUN apt-get install -y rsync dh-python
|
|
|
|
|
|
|
|
|
|
RUN apt-get install -y libelf-dev:$arch libdw-dev:$arch libbz2-dev:$arch liblzo2-dev:$arch libedit-dev:$arch libevent-dev:$arch libopts25-dev:$arch libssl-dev:$arch pps-tools:$arch libpam-cap:$arch libcap-dev:$arch libpam0g-dev:$arch libaudit-dev:$arch libgtk-3-dev:$arch libkrb5-dev:$arch libsystemd-dev:$arch libwrap0-dev:$arch libkrb5-dev:$arch libboost1.67-dev:$arch libboost-dev:$arch libzmq5:$arch libzmq3-dev:$arch libdaemon-dev:$arch libjansson-dev:$arch libmnl-dev:$arch libsensors5:$arch libsensors4-dev:$arch libperl-dev:$arch libmariadb-dev:$arch libmariadb-dev-compat:$arch libpci-dev:$arch libjson-c3:$arch libjson-c-dev:$arch libreadline-dev:$arch librtr-dev:$arch librrd-dev:$arch libnetfilter-conntrack-dev:$arch libnetfilter-conntrack3:$arch libnfnetlink-dev:$arch libnftnl-dev:$arch libldap2-dev:$arch libbind-export-dev:$arch check:$arch libboost-atomic-dev:$arch libboost-test-dev:$arch libglib2.0-dev:$arch qt5-default:$arch libexplain-dev:$arch libc-ares-dev:$arch libip4tc0:$arch libip6tc0:$arch libiptc0:$arch libxtables12:$arch iptables-dev:$arch libatm1-dev:$arch libdb-dev:$arch pkg-config:$arch libnghttp2-14:$arch librtmp1:$arch libssh2-1:$arch libcjson1:$arch libcjson-dev:$arch libcurl3-gnutls:$arch libcurl3-nss-dev:$arch libboost-thread1.67-dev:$arch libboost-thread-dev:$arch libboost-system1.67-dev:$arch libboost-system-dev:$arch libgtest-dev:$arch libgmock-dev:$arch
|
|
|
|
|
|
|
|
|
|
RUN apt-get install -y -t buster-backports \
|
|
|
|
|
libbpf-dev:$arch
|
|
|
|
|
|
|
|
|
|
RUN apt-get download libgirepository1.0-dev:$arch && dpkg --force-all -i libgirepository1.0-dev*
|
|
|
|
|
RUN PATH=/python_virtualenv/env3/bin/:$PATH pip3 install pycairo
|
|
|
|
|
|
|
|
|
|
# Install libpcsclite-dev for wpasupplicant using download because regular install removes amd64 python package
|
|
|
|
|
RUN apt-get download libpcsclite1:$arch && dpkg --force-all -i libpcsclite1* && apt-get download libpcsclite-dev:$arch && dpkg --force-all -i libpcsclite-dev*
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
2020-12-28 21:43:53 -06:00
|
|
|
|
# Tell azure pipeline to use node.js in the docker
|
|
|
|
|
LABEL "com.azure.dev.pipelines.agent.handler.node.path"="/usr/bin/node"
|
|
|
|
|
{% endif -%}
|
2021-12-07 13:11:25 -06:00
|
|
|
|
|
|
|
|
|
# Install Bazel build system (amd64 and arm64 architectures are supported using this method)
|
|
|
|
|
# TODO(PINS): Remove once pre-build Bazel binaries are available for armhf (armv7l)
|
|
|
|
|
{%- if CONFIGURED_ARCH == "amd64" or CONFIGURED_ARCH == "arm64" %}
|
|
|
|
|
ARG bazelisk_url=https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-{{ CONFIGURED_ARCH }}
|
|
|
|
|
RUN curl -fsSL -o /usr/local/bin/bazel ${bazelisk_url} && chmod 755 /usr/local/bin/bazel
|
|
|
|
|
{% endif -%}
|