2022-03-14 05:09:20 -05:00
|
|
|
{% set prefix = DEFAULT_CONTAINER_REGISTRY %}
|
2019-07-26 15:13:33 -05:00
|
|
|
{%- if CONFIGURED_ARCH == "armhf" -%}
|
2022-03-14 05:09:20 -05:00
|
|
|
FROM {{ prefix }}multiarch/debian-debootstrap:armhf-jessie
|
2019-07-26 15:13:33 -05:00
|
|
|
{%- elif CONFIGURED_ARCH == "arm64" -%}
|
2022-03-14 05:09:20 -05:00
|
|
|
FROM {{ prefix }}multiarch/debian-debootstrap:arm64-jessie
|
2019-07-26 15:13:33 -05:00
|
|
|
{%- else -%}
|
2022-03-14 05:09:20 -05:00
|
|
|
FROM {{ prefix }}debian:jessie
|
2019-07-26 15:13:33 -05:00
|
|
|
{%- endif %}
|
2019-07-26 00:06:41 -05:00
|
|
|
|
|
|
|
MAINTAINER johnar@microsoft.com
|
|
|
|
|
2020-01-07 17:52:49 -06:00
|
|
|
COPY ["no-check-valid-until", "/etc/apt/apt.conf.d/"]
|
|
|
|
|
2019-07-26 00:06:41 -05:00
|
|
|
## Remove retired jessie-updates repo
|
|
|
|
RUN sed -i '/http:\/\/deb.debian.org\/debian jessie-updates main/d' /etc/apt/sources.list
|
|
|
|
|
|
|
|
RUN echo "deb [arch=amd64] http://debian-archive.trafficmanager.net/debian/ jessie main contrib non-free" >> /etc/apt/sources.list && \
|
|
|
|
echo "deb-src [arch=amd64] http://debian-archive.trafficmanager.net/debian/ jessie main contrib non-free" >> /etc/apt/sources.list && \
|
|
|
|
echo "deb [arch=amd64] http://debian-archive.trafficmanager.net/debian-security/ jessie/updates main contrib non-free" >> /etc/apt/sources.list && \
|
|
|
|
echo "deb-src [arch=amd64] http://debian-archive.trafficmanager.net/debian-security/ jessie/updates main contrib non-free" >> /etc/apt/sources.list
|
|
|
|
|
|
|
|
{% if CONFIGURED_ARCH == "armhf" %}
|
|
|
|
RUN echo "deb [arch=armhf] http://deb.debian.org/debian jessie main contrib non-free" > /etc/apt/sources.list && \
|
|
|
|
echo "deb-src [arch=armhf] http://deb.debian.org/debian jessie main contrib non-free" >> /etc/apt/sources.list && \
|
|
|
|
echo "deb [arch=armhf] http://security.debian.org jessie/updates main contrib non-free" >> /etc/apt/sources.list && \
|
|
|
|
echo "deb-src [arch=armhf] http://security.debian.org jessie/updates main contrib non-free" >> /etc/apt/sources.list
|
|
|
|
{% elif CONFIGURED_ARCH == "arm64" %}
|
|
|
|
RUN echo "deb [arch=arm64] http://archive.debian.org/debian jessie main contrib non-free" > /etc/apt/sources.list && \
|
|
|
|
echo "deb-src [arch=arm64] http://archive.debian.org/debian jessie main contrib non-free" >> /etc/apt/sources.list && \
|
|
|
|
echo "deb-src [arch=arm64] http://archive.debian.org/debian jessie-backports main contrib non-free" >> /etc/apt/sources.list && \
|
|
|
|
echo "deb [arch=arm64] http://archive.debian.org/debian jessie-backports main contrib non-free" >> /etc/apt/sources.list
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
## Make apt-get non-interactive
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
|
|
|
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-2 \
|
|
|
|
libboost-program-options1.55-dev \
|
|
|
|
libtinyxml2-dev \
|
|
|
|
python \
|
|
|
|
python-pip \
|
|
|
|
libncurses5-dev \
|
|
|
|
texinfo \
|
|
|
|
dh-autoreconf \
|
|
|
|
python3-pip \
|
|
|
|
doxygen \
|
|
|
|
devscripts \
|
|
|
|
git-buildpackage \
|
|
|
|
perl-modules \
|
|
|
|
libswitch-perl \
|
|
|
|
dh-systemd \
|
2021-04-26 15:51:50 -05:00
|
|
|
jq \
|
2019-07-26 00:06:41 -05:00
|
|
|
# For quagga build
|
|
|
|
libreadline-dev \
|
|
|
|
texlive-latex-base \
|
|
|
|
texlive-generic-recommended \
|
|
|
|
texlive-fonts-recommended \
|
|
|
|
libpam0g-dev \
|
|
|
|
libpam-dev \
|
|
|
|
libcap-dev \
|
|
|
|
imagemagick \
|
|
|
|
ghostscript \
|
|
|
|
groff \
|
|
|
|
libpcre3-dev \
|
|
|
|
gawk \
|
|
|
|
chrpath \
|
|
|
|
# For frr build
|
|
|
|
libc-ares-dev \
|
|
|
|
hardening-wrapper \
|
|
|
|
libsnmp-dev \
|
|
|
|
libjson0 \
|
|
|
|
libjson0-dev \
|
|
|
|
libsystemd-dev \
|
|
|
|
python-ipaddr \
|
|
|
|
install-info \
|
|
|
|
# For libnl3 (local) build
|
|
|
|
cdbs \
|
|
|
|
# For SAI meta build
|
|
|
|
libxml-simple-perl \
|
|
|
|
graphviz \
|
|
|
|
aspell \
|
|
|
|
# For linux build
|
|
|
|
bc \
|
|
|
|
fakeroot \
|
|
|
|
build-essential \
|
|
|
|
devscripts \
|
|
|
|
quilt \
|
|
|
|
stgit \
|
|
|
|
# For platform-modules build
|
|
|
|
module-assistant \
|
|
|
|
# For thrift build\
|
|
|
|
gem2deb \
|
|
|
|
libboost-all-dev \
|
|
|
|
libevent-dev \
|
|
|
|
libglib2.0-dev \
|
|
|
|
libqt4-dev \
|
|
|
|
python-all-dev \
|
|
|
|
python-twisted \
|
|
|
|
php5-dev \
|
|
|
|
phpunit \
|
|
|
|
libbit-vector-perl \
|
|
|
|
openjdk-7-jdk \
|
|
|
|
javahelper \
|
|
|
|
maven-debian-helper \
|
|
|
|
ant \
|
|
|
|
libmaven-ant-tasks-java \
|
|
|
|
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 \
|
|
|
|
swig \
|
|
|
|
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 \
|
2019-07-26 15:13:33 -05:00
|
|
|
{%- if CONFIGURED_ARCH == "amd64" %}
|
2019-07-26 00:06:41 -05:00
|
|
|
# For broadcom sdk build
|
2019-09-26 12:57:16 -05:00
|
|
|
linux-compiler-gcc-4.9-x86 \
|
2019-07-26 15:13:33 -05:00
|
|
|
{%- endif %}
|
2019-07-26 00:06:41 -05:00
|
|
|
linux-kbuild-3.16 \
|
|
|
|
# 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 \
|
|
|
|
# For mft kernel module build
|
|
|
|
dkms \
|
|
|
|
# For Jenkins static analysis, unit testing and code coverage
|
|
|
|
cppcheck \
|
|
|
|
clang \
|
|
|
|
pylint \
|
|
|
|
gcovr \
|
|
|
|
python-pytest=2.6.3* \
|
|
|
|
python3-pytest=2.6.3* \
|
|
|
|
python-pytest-cov \
|
|
|
|
python3-pytest-cov \
|
|
|
|
python-parse \
|
|
|
|
# For snmpd
|
|
|
|
libmysqlclient-dev \
|
|
|
|
libmysqld-dev \
|
|
|
|
libperl-dev \
|
|
|
|
libpci-dev \
|
|
|
|
libpci3 \
|
|
|
|
libsensors4 \
|
|
|
|
libsensors4-dev \
|
|
|
|
libwrap0-dev \
|
|
|
|
# For mpdecimal
|
|
|
|
docutils-common \
|
|
|
|
libjs-sphinxdoc \
|
|
|
|
libjs-underscore \
|
|
|
|
python-docutils \
|
|
|
|
python-markupsafe \
|
|
|
|
python-pygments \
|
|
|
|
python-roman \
|
|
|
|
sphinx-common \
|
|
|
|
# For sonic config engine testing
|
|
|
|
python-lxml \
|
|
|
|
python-netaddr \
|
|
|
|
python-ipaddr \
|
|
|
|
python-yaml \
|
|
|
|
# For lockfile
|
|
|
|
procmail \
|
|
|
|
# For gtest
|
|
|
|
libgtest-dev \
|
|
|
|
cmake \
|
|
|
|
# For pam_tacplus build
|
|
|
|
autoconf-archive \
|
|
|
|
# For python-based swsscommon
|
|
|
|
swig3.0 \
|
|
|
|
# For iproute2
|
|
|
|
cm-super-minimal \
|
|
|
|
libatm1-dev \
|
|
|
|
libelf-dev \
|
|
|
|
libmnl-dev \
|
|
|
|
libselinux1-dev \
|
|
|
|
linuxdoc-tools \
|
|
|
|
lynx \
|
|
|
|
texlive-latex-extra \
|
|
|
|
texlive-latex-recommended \
|
|
|
|
# For bash
|
|
|
|
texi2html \
|
2021-10-11 02:20:51 -05:00
|
|
|
sharutils \
|
|
|
|
locales \
|
|
|
|
time \
|
|
|
|
man2html-base \
|
|
|
|
libcunit1 \
|
|
|
|
libcunit1-dev \
|
2019-07-26 00:06:41 -05:00
|
|
|
# For initramfs
|
|
|
|
bash-completion \
|
2021-11-30 21:50:09 -06:00
|
|
|
# For audisp-tacplus
|
|
|
|
libauparse-dev \
|
|
|
|
auditd \
|
2019-07-26 15:13:33 -05:00
|
|
|
{% if CONFIGURED_ARCH == "amd64" -%}
|
2019-07-26 00:06:41 -05:00
|
|
|
# For sonic vs image build
|
|
|
|
dosfstools \
|
|
|
|
qemu-kvm \
|
|
|
|
libvirt-bin
|
2019-07-26 15:13:33 -05:00
|
|
|
{%- else -%}
|
2019-07-26 00:06:41 -05:00
|
|
|
bash-completion
|
2019-07-26 15:13:33 -05:00
|
|
|
{%- endif %}
|
2019-07-26 00:06:41 -05:00
|
|
|
|
|
|
|
# For jenkins slave
|
|
|
|
# RUN apt-get -y install ca-certificates-java=20161107~bpo8+1 openjdk-8-jdk
|
|
|
|
|
|
|
|
# For linux build
|
2020-01-23 18:50:17 -06:00
|
|
|
{% if CONFIGURED_ARCH != "arm64" %}
|
2019-07-26 00:06:41 -05:00
|
|
|
RUN apt-get -y build-dep linux
|
2020-01-23 18:50:17 -06:00
|
|
|
{%- endif %}
|
2019-07-26 00:06:41 -05:00
|
|
|
|
|
|
|
# For gobgp and telemetry build
|
2023-04-20 15:35:49 -05:00
|
|
|
RUN export VERSION=1.15.15 \
|
2019-07-26 15:13:33 -05:00
|
|
|
{%- if CONFIGURED_ARCH == "armhf" %}
|
2019-07-26 00:06:41 -05:00
|
|
|
&& wget https://storage.googleapis.com/golang/go$VERSION.linux-armv6l.tar.gz \
|
|
|
|
&& tar -C /usr/local -xzf go$VERSION.linux-armv6l.tar.gz \
|
2019-07-26 15:13:33 -05:00
|
|
|
{%- elif CONFIGURED_ARCH == "arm64" %}
|
2019-07-26 00:06:41 -05:00
|
|
|
&& wget https://storage.googleapis.com/golang/go$VERSION.linux-arm64.tar.gz \
|
|
|
|
&& tar -C /usr/local -xzf go$VERSION.linux-arm64.tar.gz \
|
2019-07-26 15:13:33 -05:00
|
|
|
{%- else %}
|
2019-07-26 00:06:41 -05:00
|
|
|
&& wget https://storage.googleapis.com/golang/go$VERSION.linux-amd64.tar.gz \
|
|
|
|
&& tar -C /usr/local -xzf go$VERSION.linux-amd64.tar.gz \
|
2019-07-26 15:13:33 -05:00
|
|
|
{%- endif %}
|
2019-07-26 00:06:41 -05:00
|
|
|
&& echo 'export GOROOT=/usr/local/go' >> /etc/bash.bashrc \
|
2019-07-26 23:52:02 -05:00
|
|
|
&& echo 'export PATH=$PATH:$GOROOT/bin' >> /etc/bash.bashrc \
|
|
|
|
&& rm go$VERSION.linux-*.tar.gz
|
2019-07-26 00:06:41 -05:00
|
|
|
|
|
|
|
# Upgrade pip2
|
|
|
|
# Note: use pip2 specific version so jinja2 2.10 will install
|
|
|
|
RUN python2 -m pip install -U pip==9.0.3
|
|
|
|
|
|
|
|
# For p4 build
|
|
|
|
RUN pip install \
|
2019-09-11 00:00:15 -05:00
|
|
|
ctypesgen==0.r125 \
|
2019-07-26 00:06:41 -05:00
|
|
|
crc16
|
|
|
|
|
|
|
|
# For sonic config engine testing
|
|
|
|
RUN pip install pyangbind==0.6.0
|
|
|
|
# Note: force upgrade debian packaged jinja2, if installed
|
2019-07-26 15:13:33 -05:00
|
|
|
RUN pip install --force-reinstall --upgrade "jinja2>=2.10"
|
2019-07-26 00:06:41 -05:00
|
|
|
|
|
|
|
# For templating (requiring jinja2)
|
2019-07-26 15:13:33 -05:00
|
|
|
RUN pip install j2cli==0.3.10
|
2019-07-26 00:06:41 -05:00
|
|
|
|
|
|
|
# For vs image build
|
|
|
|
RUN pip install pexpect==4.6.0
|
|
|
|
|
|
|
|
# For sonic-utilities build
|
|
|
|
RUN pip install mockredispy==2.9.3
|
|
|
|
RUN pip install pytest-runner==4.4
|
|
|
|
RUN pip install setuptools==40.8.0
|
|
|
|
|
2020-05-27 04:21:58 -05:00
|
|
|
# For sonic-swss-common testing
|
|
|
|
RUN pip install Pympler==0.8
|
|
|
|
|
2019-07-26 00:06:41 -05: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
|
|
|
|
|
|
|
|
RUN cd /usr/src/gtest && cmake . && make -C /usr/src/gtest
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
# 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
|
|
|
|
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
|
|
|
|
RUN add-apt-repository \
|
|
|
|
"deb [arch={{ CONFIGURED_ARCH }}] https://download.docker.com/linux/debian \
|
|
|
|
$(lsb_release -cs) \
|
|
|
|
stable"
|
|
|
|
RUN apt-get update
|
2019-07-26 15:13:33 -05:00
|
|
|
{%- if CONFIGURED_ARCH == "amd64" %}
|
2019-07-26 00:06:41 -05:00
|
|
|
RUN apt-get install -y docker-ce=17.03.2~ce-0~debian-jessie
|
2020-01-23 18:50:17 -06:00
|
|
|
{%- elif CONFIGURED_ARCH == "arm64" %}
|
|
|
|
RUN apt-get install -y docker-ce=18.03.1~ce-0~debian
|
|
|
|
{%- elif CONFIGURED_ARCH == "armhf" %}
|
2019-07-26 00:06:41 -05:00
|
|
|
RUN apt-get install -y docker-ce=18.06.3~ce~3-0~debian
|
2019-07-26 15:13:33 -05:00
|
|
|
{%- endif %}
|
2021-06-08 10:24:35 -05:00
|
|
|
RUN echo "DOCKER_OPTS=\"--experimental --storage-driver=vfs {{ DOCKER_EXTRA_OPTS }}\"" >> /etc/default/docker
|
2019-07-26 15:13:33 -05:00
|
|
|
|
|
|
|
# For jenkins slave
|
2019-07-31 17:26:00 -05:00
|
|
|
RUN echo "deb [arch={{ CONFIGURED_ARCH }}] http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list
|
2019-07-26 15:13:33 -05:00
|
|
|
RUN apt-get -o Acquire::Check-Valid-Until=false update
|
|
|
|
RUN apt-get -y -o Acquire::Check-Valid-Until=false install ca-certificates-java=20161107~bpo8+1 openjdk-8-jdk
|
2020-06-09 02:25:17 -05:00
|
|
|
|
2020-12-08 18:25:54 -06:00
|
|
|
# Install m2crypto package, needed by SWI tools
|
|
|
|
RUN pip install m2crypto==0.36.0
|
|
|
|
|
2020-06-09 02:25:17 -05:00
|
|
|
# Install swi tools
|
|
|
|
RUN python -m pip install git+https://github.com/aristanetworks/swi-tools.git@d51761ec0bb93c73039233f3c01ed48235ffad00
|
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 -%}
|