[build]: use j2 template for sonic slave Dockerfile (#3223)
Generate sonic slave Dockerfile based on j2 template Signed-off-by: Guohan Lu <gulv@microsoft.com>
This commit is contained in:
parent
50fe458592
commit
1860dd5abe
2
.gitignore
vendored
2
.gitignore
vendored
@ -92,6 +92,8 @@ src/thrift/*
|
|||||||
!src/thrift/Makefile
|
!src/thrift/Makefile
|
||||||
|
|
||||||
# Autogenerated Dockerfiles
|
# Autogenerated Dockerfiles
|
||||||
|
sonic-slave/Dockerfile
|
||||||
|
sonic-slave-stretch/Dockerfile
|
||||||
dockers/docker-base/Dockerfile
|
dockers/docker-base/Dockerfile
|
||||||
dockers/docker-base-stretch/Dockerfile
|
dockers/docker-base-stretch/Dockerfile
|
||||||
dockers/docker-config-engine/Dockerfile
|
dockers/docker-config-engine/Dockerfile
|
||||||
|
@ -42,6 +42,12 @@ ifeq ($(USER), root)
|
|||||||
$(error Add your user account to docker group and use your user account to make. root or sudo are not supported!)
|
$(error Add your user account to docker group and use your user account to make. root or sudo are not supported!)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Check for j2cli availability
|
||||||
|
J2_VER := $(shell j2 --version 2>&1 | grep j2cli | awk '{printf $$2}')
|
||||||
|
ifeq ($(J2_VER),)
|
||||||
|
$(error Install j2cli)
|
||||||
|
endif
|
||||||
|
|
||||||
# Check for minimum Docker version on build host
|
# Check for minimum Docker version on build host
|
||||||
# Note: Using the greater of CE (17.05.0) and EE (17.06.1) versions that support ARG before FROM
|
# Note: Using the greater of CE (17.05.0) and EE (17.06.1) versions that support ARG before FROM
|
||||||
docker_min := 17.06.1
|
docker_min := 17.06.1
|
||||||
@ -58,23 +64,22 @@ $(shell rm -f .screen)
|
|||||||
MAKEFLAGS += -B
|
MAKEFLAGS += -B
|
||||||
|
|
||||||
CONFIGURED_ARCH := $(shell [ -f .arch ] && cat .arch || echo $(PLATFORM_ARCH))
|
CONFIGURED_ARCH := $(shell [ -f .arch ] && cat .arch || echo $(PLATFORM_ARCH))
|
||||||
|
ifeq ($(CONFIGURED_ARCH),)
|
||||||
|
override CONFIGURED_ARCH = amd64
|
||||||
|
endif
|
||||||
ifeq ($(PLATFORM_ARCH),)
|
ifeq ($(PLATFORM_ARCH),)
|
||||||
override PLATFORM_ARCH = $(CONFIGURED_ARCH)
|
override PLATFORM_ARCH = $(CONFIGURED_ARCH)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(BLDENV), stretch)
|
ifeq ($(BLDENV), stretch)
|
||||||
SLAVE_BASE_TAG = $(shell sha1sum sonic-slave-stretch/Dockerfile | awk '{print substr($$1,0,11);}')
|
|
||||||
SLAVE_TAG = $(shell cat sonic-slave-stretch/Dockerfile.user sonic-slave-stretch/Dockerfile | sha1sum | awk '{print substr($$1,0,11);}')
|
|
||||||
SLAVE_BASE_IMAGE = sonic-slave-stretch-base
|
|
||||||
SLAVE_IMAGE = sonic-slave-stretch-$(USER)
|
|
||||||
SLAVE_DIR = sonic-slave-stretch
|
SLAVE_DIR = sonic-slave-stretch
|
||||||
else
|
else
|
||||||
SLAVE_BASE_TAG = $(shell sha1sum sonic-slave/Dockerfile | awk '{print substr($$1,0,11);}')
|
|
||||||
SLAVE_TAG = $(shell cat sonic-slave/Dockerfile.user sonic-slave/Dockerfile | sha1sum | awk '{print substr($$1,0,11);}')
|
|
||||||
SLAVE_BASE_IMAGE = sonic-slave-base
|
|
||||||
SLAVE_IMAGE = sonic-slave-$(USER)
|
|
||||||
SLAVE_DIR = sonic-slave
|
SLAVE_DIR = sonic-slave
|
||||||
endif
|
endif
|
||||||
|
SLAVE_BASE_TAG = $(shell CONFIGURED_ARCH=$(CONFIGURED_ARCH) j2 $(SLAVE_DIR)/Dockerfile.j2 > $(SLAVE_DIR)/Dockerfile && sha1sum $(SLAVE_DIR)/Dockerfile | awk '{print substr($$1,0,11);}')
|
||||||
|
SLAVE_TAG = $(shell cat $(SLAVE_DIR)/Dockerfile.user $(SLAVE_DIR)/Dockerfile | sha1sum | awk '{print substr($$1,0,11);}')
|
||||||
|
SLAVE_BASE_IMAGE = $(SLAVE_DIR)-base
|
||||||
|
SLAVE_IMAGE = $(SLAVE_BASE_IMAGE)-$(USER)
|
||||||
|
|
||||||
OVERLAY_MODULE_CHECK := \
|
OVERLAY_MODULE_CHECK := \
|
||||||
lsmod | grep -q "^overlay " &>/dev/null || \
|
lsmod | grep -q "^overlay " &>/dev/null || \
|
||||||
@ -184,7 +189,6 @@ ifneq (,$(filter $(CONFIGURED_ARCH), armhf arm64))
|
|||||||
endif
|
endif
|
||||||
@$(OVERLAY_MODULE_CHECK)
|
@$(OVERLAY_MODULE_CHECK)
|
||||||
|
|
||||||
@{ which j2 &> /dev/null && CONFIGURED_ARCH=$(CONFIGURED_ARCH) j2 $(SLAVE_DIR)/Dockerfile.j2 > $(SLAVE_DIR)/Dockerfile ; } || true
|
|
||||||
@docker inspect --type image $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) &> /dev/null || \
|
@docker inspect --type image $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) &> /dev/null || \
|
||||||
{ echo Image $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) not found. Building... ; \
|
{ echo Image $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) not found. Building... ; \
|
||||||
$(DOCKER_BASE_BUILD) ; }
|
$(DOCKER_BASE_BUILD) ; }
|
||||||
|
@ -1,333 +0,0 @@
|
|||||||
FROM debian:stretch
|
|
||||||
|
|
||||||
MAINTAINER gulv@microsoft.com
|
|
||||||
|
|
||||||
RUN echo "deb http://debian-archive.trafficmanager.net/debian/ stretch main contrib non-free" >> /etc/apt/sources.list && \
|
|
||||||
echo "deb-src http://debian-archive.trafficmanager.net/debian/ stretch main contrib non-free" >> /etc/apt/sources.list && \
|
|
||||||
echo "deb http://debian-archive.trafficmanager.net/debian-security/ stretch/updates main contrib non-free" >> /etc/apt/sources.list && \
|
|
||||||
echo "deb-src http://debian-archive.trafficmanager.net/debian-security/ stretch/updates main contrib non-free" >> /etc/apt/sources.list && \
|
|
||||||
echo "deb http://debian-archive.trafficmanager.net/debian stretch-backports main" >> /etc/apt/sources.list
|
|
||||||
|
|
||||||
## 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-4 \
|
|
||||||
libboost-program-options1.62-dev \
|
|
||||||
libtinyxml2-dev \
|
|
||||||
python \
|
|
||||||
python-pip \
|
|
||||||
libncurses5-dev \
|
|
||||||
texinfo \
|
|
||||||
dh-autoreconf \
|
|
||||||
python3-pip \
|
|
||||||
doxygen \
|
|
||||||
devscripts \
|
|
||||||
git-buildpackage \
|
|
||||||
perl-modules \
|
|
||||||
libswitch-perl \
|
|
||||||
dh-systemd \
|
|
||||||
# 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 \
|
|
||||||
libsnmp-dev \
|
|
||||||
libjson-c3 \
|
|
||||||
libjson-c-dev \
|
|
||||||
libsystemd-dev \
|
|
||||||
python-ipaddr \
|
|
||||||
libcmocka-dev \
|
|
||||||
python3-all-dev \
|
|
||||||
python3-all-dbg \
|
|
||||||
install-info \
|
|
||||||
logrotate \
|
|
||||||
# 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 \
|
|
||||||
phpunit \
|
|
||||||
libbit-vector-perl \
|
|
||||||
openjdk-8-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 \
|
|
||||||
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
|
|
||||||
linux-compiler-gcc-6-x86 \
|
|
||||||
linux-kbuild-4.9 \
|
|
||||||
# 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 python3.5 build
|
|
||||||
sharutils \
|
|
||||||
libncursesw5-dev \
|
|
||||||
libbz2-dev \
|
|
||||||
liblzma-dev \
|
|
||||||
libgdbm-dev \
|
|
||||||
tk-dev \
|
|
||||||
blt-dev \
|
|
||||||
libmpdec-dev \
|
|
||||||
libbluetooth-dev \
|
|
||||||
locales \
|
|
||||||
libsqlite3-dev \
|
|
||||||
libgpm2 \
|
|
||||||
time \
|
|
||||||
net-tools \
|
|
||||||
xvfb \
|
|
||||||
python-sphinx \
|
|
||||||
python3-sphinx \
|
|
||||||
# For Jenkins static analysis, unit testing and code coverage
|
|
||||||
cppcheck \
|
|
||||||
clang \
|
|
||||||
pylint \
|
|
||||||
python-pytest \
|
|
||||||
gcovr \
|
|
||||||
python-pytest-cov \
|
|
||||||
python-parse \
|
|
||||||
# For snmpd
|
|
||||||
default-libmysqlclient-dev \
|
|
||||||
libssl1.0-dev \
|
|
||||||
libperl-dev \
|
|
||||||
libpci-dev \
|
|
||||||
libpci3 \
|
|
||||||
libsensors4 \
|
|
||||||
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
|
|
||||||
python-lxml \
|
|
||||||
python-jinja2 \
|
|
||||||
python-netaddr \
|
|
||||||
python-ipaddr \
|
|
||||||
python-yaml \
|
|
||||||
python3-yaml \
|
|
||||||
# For lockfile
|
|
||||||
procmail \
|
|
||||||
# For gtest
|
|
||||||
libgtest-dev \
|
|
||||||
cmake \
|
|
||||||
# For pam_tacplus build
|
|
||||||
autoconf-archive \
|
|
||||||
# For python-click build
|
|
||||||
python-sphinx \
|
|
||||||
python-docutils \
|
|
||||||
python3-all \
|
|
||||||
python3-setuptools \
|
|
||||||
python3-sphinx \
|
|
||||||
python3-docutils \
|
|
||||||
python3-requests \
|
|
||||||
python3-pytest \
|
|
||||||
python3-colorama \
|
|
||||||
# For initramfs
|
|
||||||
bash-completion \
|
|
||||||
# For sonic vs image build
|
|
||||||
dosfstools \
|
|
||||||
qemu-kvm \
|
|
||||||
libvirt-clients \
|
|
||||||
# For lm-sensors
|
|
||||||
librrd8 \
|
|
||||||
librrd-dev \
|
|
||||||
rrdtool \
|
|
||||||
# For smartmontools 6.6-1
|
|
||||||
automake1.11 \
|
|
||||||
libselinux1-dev
|
|
||||||
|
|
||||||
# For smartmontools 6.6-1
|
|
||||||
RUN apt-get -t stretch-backports install -y debhelper
|
|
||||||
|
|
||||||
# For linux build
|
|
||||||
RUN apt-get -y build-dep linux
|
|
||||||
|
|
||||||
# For gobgp and telemetry build
|
|
||||||
RUN export VERSION=1.11.5 \
|
|
||||||
&& wget https://storage.googleapis.com/golang/go$VERSION.linux-amd64.tar.gz \
|
|
||||||
&& tar -C /usr/local -xzf go$VERSION.linux-amd64.tar.gz \
|
|
||||||
&& echo 'export GOROOT=/usr/local/go' >> /etc/bash.bashrc \
|
|
||||||
&& echo 'export PATH=$PATH:$GOROOT/bin' >> /etc/bash.bashrc
|
|
||||||
|
|
||||||
# For p4 build
|
|
||||||
RUN pip install \
|
|
||||||
ctypesgen \
|
|
||||||
crc16
|
|
||||||
|
|
||||||
# For sonic config engine testing
|
|
||||||
RUN pip install pyangbind==0.6.0
|
|
||||||
# Note: force upgrade debian packaged jinja2, if installed
|
|
||||||
RUN pip install --force-reinstall --upgrade "jinja2>=2.10"
|
|
||||||
|
|
||||||
# For templating
|
|
||||||
RUN pip install j2cli==0.3.10
|
|
||||||
|
|
||||||
# Remove python-click 6.6
|
|
||||||
RUN apt-get purge -y python-click
|
|
||||||
# For sonic utilities testing
|
|
||||||
RUN pip install click-default-group click natsort tabulate netifaces==0.10.7 fastentrypoints
|
|
||||||
|
|
||||||
# For sonic snmpagent mock testing
|
|
||||||
RUN pip3 install mockredispy==2.9.3
|
|
||||||
|
|
||||||
RUN pip3 install "PyYAML>=5.1"
|
|
||||||
|
|
||||||
# For sonic-platform-common testing
|
|
||||||
RUN pip3 install redis
|
|
||||||
|
|
||||||
# For supervisor build
|
|
||||||
RUN pip install meld3 mock
|
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
# 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=amd64] https://download.docker.com/linux/debian \
|
|
||||||
$(lsb_release -cs) \
|
|
||||||
stable"
|
|
||||||
RUN apt-get update
|
|
||||||
RUN apt-get install -y docker-ce=5:18.09.5~3-0~debian-stretch
|
|
||||||
RUN echo "DOCKER_OPTS=\"--experimental --storage-driver=vfs\"" >> /etc/default/docker
|
|
@ -1,10 +1,10 @@
|
|||||||
{% if CONFIGURED_ARCH == "armhf" %}
|
{%- if CONFIGURED_ARCH == "armhf" %}
|
||||||
FROM multiarch/debian-debootstrap:armhf-stretch
|
FROM multiarch/debian-debootstrap:armhf-stretch
|
||||||
{% elif CONFIGURED_ARCH == "arm64" %}
|
{%- elif CONFIGURED_ARCH == "arm64" %}
|
||||||
FROM multiarch/debian-debootstrap:arm64-stretch
|
FROM multiarch/debian-debootstrap:arm64-stretch
|
||||||
{% else %}
|
{%- else -%}
|
||||||
FROM debian:stretch
|
FROM debian:stretch
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
|
|
||||||
MAINTAINER gulv@microsoft.com
|
MAINTAINER gulv@microsoft.com
|
||||||
|
|
||||||
@ -14,7 +14,7 @@ RUN echo "deb [arch=amd64] http://debian-archive.trafficmanager.net/debian/ stre
|
|||||||
echo "deb-src [arch=amd64] http://debian-archive.trafficmanager.net/debian-security/ stretch/updates main contrib non-free" >> /etc/apt/sources.list && \
|
echo "deb-src [arch=amd64] http://debian-archive.trafficmanager.net/debian-security/ stretch/updates main contrib non-free" >> /etc/apt/sources.list && \
|
||||||
echo "deb [arch=amd64] http://debian-archive.trafficmanager.net/debian stretch-backports main" >> /etc/apt/sources.list
|
echo "deb [arch=amd64] http://debian-archive.trafficmanager.net/debian stretch-backports main" >> /etc/apt/sources.list
|
||||||
|
|
||||||
{% if CONFIGURED_ARCH == "armhf" %}
|
{%- if CONFIGURED_ARCH == "armhf" %}
|
||||||
RUN echo "deb [arch=armhf] http://deb.debian.org/debian stretch main contrib non-free" > /etc/apt/sources.list && \
|
RUN echo "deb [arch=armhf] http://deb.debian.org/debian stretch main contrib non-free" > /etc/apt/sources.list && \
|
||||||
echo "deb-src [arch=armhf] http://deb.debian.org/debian stretch main contrib non-free" >> /etc/apt/sources.list && \
|
echo "deb-src [arch=armhf] http://deb.debian.org/debian stretch main contrib non-free" >> /etc/apt/sources.list && \
|
||||||
echo "deb [arch=armhf] http://deb.debian.org/debian stretch-updates main contrib non-free" >> /etc/apt/sources.list && \
|
echo "deb [arch=armhf] http://deb.debian.org/debian stretch-updates main contrib non-free" >> /etc/apt/sources.list && \
|
||||||
@ -22,7 +22,7 @@ RUN echo "deb [arch=armhf] http://deb.debian.org/debian stretch main contrib non
|
|||||||
echo "deb [arch=armhf] http://security.debian.org stretch/updates main contrib non-free" >> /etc/apt/sources.list && \
|
echo "deb [arch=armhf] http://security.debian.org stretch/updates main contrib non-free" >> /etc/apt/sources.list && \
|
||||||
echo "deb-src [arch=armhf] http://security.debian.org stretch/updates main contrib non-free" >> /etc/apt/sources.list && \
|
echo "deb-src [arch=armhf] http://security.debian.org stretch/updates main contrib non-free" >> /etc/apt/sources.list && \
|
||||||
echo 'deb [arch=armhf] http://ftp.debian.org/debian stretch-backports main' >> /etc/apt/sources.list
|
echo 'deb [arch=armhf] http://ftp.debian.org/debian stretch-backports main' >> /etc/apt/sources.list
|
||||||
{% elif CONFIGURED_ARCH == "arm64" %}
|
{%- elif CONFIGURED_ARCH == "arm64" %}
|
||||||
RUN echo "deb [arch=arm64] http://deb.debian.org/debian stretch main contrib non-free" > /etc/apt/sources.list && \
|
RUN echo "deb [arch=arm64] http://deb.debian.org/debian stretch main contrib non-free" > /etc/apt/sources.list && \
|
||||||
echo "deb-src [arch=arm64] http://deb.debian.org/debian stretch main contrib non-free" >> /etc/apt/sources.list && \
|
echo "deb-src [arch=arm64] http://deb.debian.org/debian stretch main contrib non-free" >> /etc/apt/sources.list && \
|
||||||
echo "deb [arch=arm64] http://deb.debian.org/debian stretch-updates main contrib non-free" >> /etc/apt/sources.list && \
|
echo "deb [arch=arm64] http://deb.debian.org/debian stretch-updates main contrib non-free" >> /etc/apt/sources.list && \
|
||||||
@ -30,7 +30,7 @@ RUN echo "deb [arch=arm64] http://deb.debian.org/debian stretch main contrib non
|
|||||||
echo "deb [arch=arm64] http://security.debian.org stretch/updates main contrib non-free" >> /etc/apt/sources.list && \
|
echo "deb [arch=arm64] http://security.debian.org stretch/updates main contrib non-free" >> /etc/apt/sources.list && \
|
||||||
echo "deb-src [arch=arm64] http://security.debian.org stretch/updates main contrib non-free" >> /etc/apt/sources.list && \
|
echo "deb-src [arch=arm64] http://security.debian.org stretch/updates main contrib non-free" >> /etc/apt/sources.list && \
|
||||||
echo 'deb [arch=arm64] http://ftp.debian.org/debian stretch-backports main' >> /etc/apt/sources.list
|
echo 'deb [arch=arm64] http://ftp.debian.org/debian stretch-backports main' >> /etc/apt/sources.list
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
|
|
||||||
## Make apt-get non-interactive
|
## Make apt-get non-interactive
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
@ -154,9 +154,9 @@ RUN apt-get update && apt-get install -y \
|
|||||||
squashfs-tools \
|
squashfs-tools \
|
||||||
zip \
|
zip \
|
||||||
# For broadcom sdk build
|
# For broadcom sdk build
|
||||||
{% if CONFIGURED_ARCH == "amd64" %}
|
{%- if CONFIGURED_ARCH == "amd64" %}
|
||||||
linux-compiler-gcc-6-x86 \
|
linux-compiler-gcc-6-x86 \
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
linux-kbuild-4.9 \
|
linux-kbuild-4.9 \
|
||||||
# teamd build
|
# teamd build
|
||||||
libdaemon-dev \
|
libdaemon-dev \
|
||||||
@ -177,6 +177,9 @@ RUN apt-get update && apt-get install -y \
|
|||||||
python-stdeb \
|
python-stdeb \
|
||||||
# For redis build
|
# For redis build
|
||||||
libjemalloc-dev \
|
libjemalloc-dev \
|
||||||
|
liblua5.1-0-dev \
|
||||||
|
lua-bitop-dev \
|
||||||
|
lua-cjson-dev \
|
||||||
# For mft kernel module build
|
# For mft kernel module build
|
||||||
dkms \
|
dkms \
|
||||||
# For python3.5 build
|
# For python3.5 build
|
||||||
@ -258,12 +261,12 @@ RUN apt-get update && apt-get install -y \
|
|||||||
python3-colorama \
|
python3-colorama \
|
||||||
# For initramfs
|
# For initramfs
|
||||||
bash-completion \
|
bash-completion \
|
||||||
{% if CONFIGURED_ARCH == "amd64" %}
|
{%- if CONFIGURED_ARCH == "amd64" %}
|
||||||
# For sonic vs image build
|
# For sonic vs image build
|
||||||
dosfstools \
|
dosfstools \
|
||||||
qemu-kvm \
|
qemu-kvm \
|
||||||
libvirt-clients \
|
libvirt-clients \
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
# For lm-sensors
|
# For lm-sensors
|
||||||
librrd8 \
|
librrd8 \
|
||||||
librrd-dev \
|
librrd-dev \
|
||||||
@ -280,16 +283,16 @@ RUN apt-get -y build-dep linux
|
|||||||
|
|
||||||
# For gobgp and telemetry build
|
# For gobgp and telemetry build
|
||||||
RUN export VERSION=1.11.5 \
|
RUN export VERSION=1.11.5 \
|
||||||
{% if CONFIGURED_ARCH == "armhf" %}
|
{%- if CONFIGURED_ARCH == "armhf" %}
|
||||||
&& wget https://storage.googleapis.com/golang/go$VERSION.linux-armv6l.tar.gz \
|
&& wget https://storage.googleapis.com/golang/go$VERSION.linux-armv6l.tar.gz \
|
||||||
&& tar -C /usr/local -xzf go$VERSION.linux-armv6l.tar.gz \
|
&& tar -C /usr/local -xzf go$VERSION.linux-armv6l.tar.gz \
|
||||||
{% elif CONFIGURED_ARCH == "arm64" %}
|
{%- elif CONFIGURED_ARCH == "arm64" %}
|
||||||
&& wget https://storage.googleapis.com/golang/go$VERSION.linux-arm64.tar.gz \
|
&& wget https://storage.googleapis.com/golang/go$VERSION.linux-arm64.tar.gz \
|
||||||
&& tar -C /usr/local -xzf go$VERSION.linux-arm64.tar.gz \
|
&& tar -C /usr/local -xzf go$VERSION.linux-arm64.tar.gz \
|
||||||
{% else %}
|
{%- else %}
|
||||||
&& wget https://storage.googleapis.com/golang/go$VERSION.linux-amd64.tar.gz \
|
&& wget https://storage.googleapis.com/golang/go$VERSION.linux-amd64.tar.gz \
|
||||||
&& tar -C /usr/local -xzf go$VERSION.linux-amd64.tar.gz \
|
&& tar -C /usr/local -xzf go$VERSION.linux-amd64.tar.gz \
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
&& echo 'export GOROOT=/usr/local/go' >> /etc/bash.bashrc \
|
&& echo 'export GOROOT=/usr/local/go' >> /etc/bash.bashrc \
|
||||||
&& echo 'export PATH=$PATH:$GOROOT/bin' >> /etc/bash.bashrc
|
&& echo 'export PATH=$PATH:$GOROOT/bin' >> /etc/bash.bashrc
|
||||||
|
|
||||||
@ -301,10 +304,10 @@ RUN pip install \
|
|||||||
# For sonic config engine testing
|
# For sonic config engine testing
|
||||||
RUN pip install pyangbind==0.6.0
|
RUN pip install pyangbind==0.6.0
|
||||||
# Note: force upgrade debian packaged jinja2, if installed
|
# Note: force upgrade debian packaged jinja2, if installed
|
||||||
RUN pip install --force-reinstall --upgrade jinja2>=2.10
|
RUN pip install --force-reinstall --upgrade "jinja2>=2.10"
|
||||||
|
|
||||||
# For templating
|
# For templating
|
||||||
RUN pip install j2cli
|
RUN pip install j2cli==0.3.10
|
||||||
|
|
||||||
# Remove python-click 6.6
|
# Remove python-click 6.6
|
||||||
RUN apt-get purge -y python-click
|
RUN apt-get purge -y python-click
|
||||||
@ -314,7 +317,7 @@ RUN pip install click-default-group click natsort tabulate netifaces==0.10.7 fas
|
|||||||
# For sonic snmpagent mock testing
|
# For sonic snmpagent mock testing
|
||||||
RUN pip3 install mockredispy==2.9.3
|
RUN pip3 install mockredispy==2.9.3
|
||||||
|
|
||||||
RUN pip3 install PyYAML>=5.1
|
RUN pip3 install "PyYAML>=5.1"
|
||||||
|
|
||||||
# For sonic-platform-common testing
|
# For sonic-platform-common testing
|
||||||
RUN pip3 install redis
|
RUN pip3 install redis
|
||||||
@ -362,9 +365,9 @@ RUN add-apt-repository \
|
|||||||
$(lsb_release -cs) \
|
$(lsb_release -cs) \
|
||||||
stable"
|
stable"
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
{% if CONFIGURED_ARCH == "amd64" %}
|
{%- if CONFIGURED_ARCH == "amd64" %}
|
||||||
RUN apt-get install -y docker-ce=17.03.2~ce-0~debian-stretch
|
RUN apt-get install -y docker-ce=5:18.09.5~3-0~debian-stretch
|
||||||
{% else %}
|
{%- else %}
|
||||||
RUN apt-get install -y docker-ce=18.06.3~ce~3-0~debian
|
RUN apt-get install -y docker-ce=18.06.3~ce~3-0~debian
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
RUN echo "DOCKER_OPTS=\"--experimental --storage-driver=vfs\"" >> /etc/default/docker
|
RUN echo "DOCKER_OPTS=\"--experimental --storage-driver=vfs\"" >> /etc/default/docker
|
||||||
|
@ -1,328 +0,0 @@
|
|||||||
FROM debian:jessie
|
|
||||||
|
|
||||||
MAINTAINER johnar@microsoft.com
|
|
||||||
|
|
||||||
## Remove retired jessie-updates repo
|
|
||||||
RUN sed -i '/deb http:\/\/deb.debian.org\/debian jessie-updates main/d' /etc/apt/sources.list
|
|
||||||
|
|
||||||
RUN echo "deb http://debian-archive.trafficmanager.net/debian/ jessie main contrib non-free" >> /etc/apt/sources.list && \
|
|
||||||
echo "deb-src http://debian-archive.trafficmanager.net/debian/ jessie main contrib non-free" >> /etc/apt/sources.list && \
|
|
||||||
echo "deb http://debian-archive.trafficmanager.net/debian-security/ jessie/updates main contrib non-free" >> /etc/apt/sources.list && \
|
|
||||||
echo "deb-src http://debian-archive.trafficmanager.net/debian-security/ jessie/updates main contrib non-free" >> /etc/apt/sources.list
|
|
||||||
|
|
||||||
## 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 \
|
|
||||||
# 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 \
|
|
||||||
# For broadcom sdk build
|
|
||||||
linux-compiler-gcc-4.8-x86 \
|
|
||||||
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 python3.5 build
|
|
||||||
sharutils \
|
|
||||||
libncursesw5-dev \
|
|
||||||
libbz2-dev \
|
|
||||||
liblzma-dev \
|
|
||||||
libgdbm-dev \
|
|
||||||
tk-dev \
|
|
||||||
blt-dev \
|
|
||||||
libmpdec-dev \
|
|
||||||
libbluetooth-dev \
|
|
||||||
locales \
|
|
||||||
libsqlite3-dev \
|
|
||||||
libgpm2 \
|
|
||||||
time \
|
|
||||||
net-tools \
|
|
||||||
xvfb \
|
|
||||||
python-sphinx \
|
|
||||||
python3-sphinx \
|
|
||||||
# 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 python-click build
|
|
||||||
python-sphinx \
|
|
||||||
python-docutils \
|
|
||||||
python3-all \
|
|
||||||
python3-setuptools \
|
|
||||||
python3-sphinx \
|
|
||||||
python3-docutils \
|
|
||||||
python3-requests \
|
|
||||||
python3-pytest \
|
|
||||||
python3-colorama \
|
|
||||||
# For bash
|
|
||||||
texi2html \
|
|
||||||
# For initramfs
|
|
||||||
bash-completion \
|
|
||||||
# For sonic vs image build
|
|
||||||
dosfstools \
|
|
||||||
qemu-kvm \
|
|
||||||
libvirt-bin
|
|
||||||
|
|
||||||
# For jenkins slave
|
|
||||||
# RUN apt-get -y install ca-certificates-java=20161107~bpo8+1 openjdk-8-jdk
|
|
||||||
|
|
||||||
# For linux build
|
|
||||||
RUN apt-get -y build-dep linux
|
|
||||||
|
|
||||||
# For gobgp and telemetry build
|
|
||||||
RUN export VERSION=1.11.5 \
|
|
||||||
&& wget https://storage.googleapis.com/golang/go$VERSION.linux-amd64.tar.gz \
|
|
||||||
&& tar -C /usr/local -xzf go$VERSION.linux-amd64.tar.gz \
|
|
||||||
&& echo 'export GOROOT=/usr/local/go' >> /etc/bash.bashrc \
|
|
||||||
&& echo 'export PATH=$PATH:$GOROOT/bin' >> /etc/bash.bashrc
|
|
||||||
|
|
||||||
# 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 \
|
|
||||||
ctypesgen \
|
|
||||||
crc16
|
|
||||||
|
|
||||||
# For sonic config engine testing
|
|
||||||
RUN pip install pyangbind==0.6.0
|
|
||||||
# Note: force upgrade debian packaged jinja2, if installed
|
|
||||||
RUN pip install --force-reinstall --upgrade "jinja2>=2.10"
|
|
||||||
|
|
||||||
# For templating (requiring jinja2)
|
|
||||||
RUN pip install j2cli==0.3.10
|
|
||||||
|
|
||||||
# For sonic utilities testing
|
|
||||||
RUN pip install click-default-group click natsort tabulate netifaces==0.10.7 fastentrypoints
|
|
||||||
|
|
||||||
# For supervisor build
|
|
||||||
RUN pip install meld3 mock
|
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
# 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=amd64] https://download.docker.com/linux/debian \
|
|
||||||
$(lsb_release -cs) \
|
|
||||||
stable"
|
|
||||||
RUN apt-get update
|
|
||||||
RUN apt-get install -y docker-ce=17.03.2~ce-0~debian-jessie
|
|
||||||
RUN echo "DOCKER_OPTS=\"--experimental --storage-driver=vfs\"" >> /etc/default/docker
|
|
||||||
|
|
||||||
# For jenkins slave
|
|
||||||
RUN echo "deb http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list
|
|
||||||
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
|
|
@ -1,10 +1,10 @@
|
|||||||
{% if CONFIGURED_ARCH == "armhf" %}
|
{%- if CONFIGURED_ARCH == "armhf" -%}
|
||||||
FROM multiarch/debian-debootstrap:armhf-jessie
|
FROM multiarch/debian-debootstrap:armhf-jessie
|
||||||
{% elif CONFIGURED_ARCH == "arm64" %}
|
{%- elif CONFIGURED_ARCH == "arm64" -%}
|
||||||
FROM multiarch/debian-debootstrap:arm64-jessie
|
FROM multiarch/debian-debootstrap:arm64-jessie
|
||||||
{% else %}
|
{%- else -%}
|
||||||
FROM debian:jessie
|
FROM debian:jessie
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
|
|
||||||
MAINTAINER johnar@microsoft.com
|
MAINTAINER johnar@microsoft.com
|
||||||
|
|
||||||
@ -148,10 +148,10 @@ RUN apt-get update && apt-get install -y \
|
|||||||
cpio \
|
cpio \
|
||||||
squashfs-tools \
|
squashfs-tools \
|
||||||
zip \
|
zip \
|
||||||
{% if CONFIGURED_ARCH == "amd64" %}
|
{%- if CONFIGURED_ARCH == "amd64" %}
|
||||||
# For broadcom sdk build
|
# For broadcom sdk build
|
||||||
linux-compiler-gcc-4.8-x86 \
|
linux-compiler-gcc-4.8-x86 \
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
linux-kbuild-3.16 \
|
linux-kbuild-3.16 \
|
||||||
# teamd build
|
# teamd build
|
||||||
libdaemon-dev \
|
libdaemon-dev \
|
||||||
@ -258,14 +258,14 @@ RUN apt-get update && apt-get install -y \
|
|||||||
texi2html \
|
texi2html \
|
||||||
# For initramfs
|
# For initramfs
|
||||||
bash-completion \
|
bash-completion \
|
||||||
{% if CONFIGURED_ARCH == "amd64" %}
|
{% if CONFIGURED_ARCH == "amd64" -%}
|
||||||
# For sonic vs image build
|
# For sonic vs image build
|
||||||
dosfstools \
|
dosfstools \
|
||||||
qemu-kvm \
|
qemu-kvm \
|
||||||
libvirt-bin
|
libvirt-bin
|
||||||
{% else %}
|
{%- else -%}
|
||||||
bash-completion
|
bash-completion
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
|
|
||||||
# For jenkins slave
|
# For jenkins slave
|
||||||
# RUN apt-get -y install ca-certificates-java=20161107~bpo8+1 openjdk-8-jdk
|
# RUN apt-get -y install ca-certificates-java=20161107~bpo8+1 openjdk-8-jdk
|
||||||
@ -275,16 +275,16 @@ RUN apt-get -y build-dep linux
|
|||||||
|
|
||||||
# For gobgp and telemetry build
|
# For gobgp and telemetry build
|
||||||
RUN export VERSION=1.11.5 \
|
RUN export VERSION=1.11.5 \
|
||||||
{% if CONFIGURED_ARCH == "armhf" %}
|
{%- if CONFIGURED_ARCH == "armhf" %}
|
||||||
&& wget https://storage.googleapis.com/golang/go$VERSION.linux-armv6l.tar.gz \
|
&& wget https://storage.googleapis.com/golang/go$VERSION.linux-armv6l.tar.gz \
|
||||||
&& tar -C /usr/local -xzf go$VERSION.linux-armv6l.tar.gz \
|
&& tar -C /usr/local -xzf go$VERSION.linux-armv6l.tar.gz \
|
||||||
{% elif CONFIGURED_ARCH == "arm64" %}
|
{%- elif CONFIGURED_ARCH == "arm64" %}
|
||||||
&& wget https://storage.googleapis.com/golang/go$VERSION.linux-arm64.tar.gz \
|
&& wget https://storage.googleapis.com/golang/go$VERSION.linux-arm64.tar.gz \
|
||||||
&& tar -C /usr/local -xzf go$VERSION.linux-arm64.tar.gz \
|
&& tar -C /usr/local -xzf go$VERSION.linux-arm64.tar.gz \
|
||||||
{% else %}
|
{%- else %}
|
||||||
&& wget https://storage.googleapis.com/golang/go$VERSION.linux-amd64.tar.gz \
|
&& wget https://storage.googleapis.com/golang/go$VERSION.linux-amd64.tar.gz \
|
||||||
&& tar -C /usr/local -xzf go$VERSION.linux-amd64.tar.gz \
|
&& tar -C /usr/local -xzf go$VERSION.linux-amd64.tar.gz \
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
&& echo 'export GOROOT=/usr/local/go' >> /etc/bash.bashrc \
|
&& echo 'export GOROOT=/usr/local/go' >> /etc/bash.bashrc \
|
||||||
&& echo 'export PATH=$PATH:$GOROOT/bin' >> /etc/bash.bashrc
|
&& echo 'export PATH=$PATH:$GOROOT/bin' >> /etc/bash.bashrc
|
||||||
|
|
||||||
@ -300,10 +300,10 @@ RUN pip install \
|
|||||||
# For sonic config engine testing
|
# For sonic config engine testing
|
||||||
RUN pip install pyangbind==0.6.0
|
RUN pip install pyangbind==0.6.0
|
||||||
# Note: force upgrade debian packaged jinja2, if installed
|
# Note: force upgrade debian packaged jinja2, if installed
|
||||||
RUN pip install --force-reinstall --upgrade jinja2>=2.10
|
RUN pip install --force-reinstall --upgrade "jinja2>=2.10"
|
||||||
|
|
||||||
# For templating (requiring jinja2)
|
# For templating (requiring jinja2)
|
||||||
RUN pip install j2cli
|
RUN pip install j2cli==0.3.10
|
||||||
|
|
||||||
# For sonic utilities testing
|
# For sonic utilities testing
|
||||||
RUN pip install click-default-group click natsort tabulate netifaces==0.10.7 fastentrypoints
|
RUN pip install click-default-group click natsort tabulate netifaces==0.10.7 fastentrypoints
|
||||||
@ -351,9 +351,14 @@ RUN add-apt-repository \
|
|||||||
$(lsb_release -cs) \
|
$(lsb_release -cs) \
|
||||||
stable"
|
stable"
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
{% if CONFIGURED_ARCH == "amd64" %}
|
{%- if CONFIGURED_ARCH == "amd64" %}
|
||||||
RUN apt-get install -y docker-ce=17.03.2~ce-0~debian-jessie
|
RUN apt-get install -y docker-ce=17.03.2~ce-0~debian-jessie
|
||||||
{% else %}
|
{%- else %}
|
||||||
RUN apt-get install -y docker-ce=18.06.3~ce~3-0~debian
|
RUN apt-get install -y docker-ce=18.06.3~ce~3-0~debian
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
RUN echo "DOCKER_OPTS=\"--experimental --storage-driver=vfs\"" >> /etc/default/docker
|
RUN echo "DOCKER_OPTS=\"--experimental --storage-driver=vfs\"" >> /etc/default/docker
|
||||||
|
|
||||||
|
# For jenkins slave
|
||||||
|
RUN echo "deb [arch=amd64] http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list
|
||||||
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user