summaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-04-26 11:54:44 +0200
committerChristian Poessinger <christian@poessinger.com>2019-04-26 15:52:56 +0200
commitbda5855952a59fa654e54c77b468375e35a898ed (patch)
tree658f3051617183dc5832af673cef9bb193efa94b /docker
parentc4808dbfe570154e3ed649e2e7fe567d18b559e6 (diff)
downloadvyos-build-bda5855952a59fa654e54c77b468375e35a898ed.tar.gz
vyos-build-bda5855952a59fa654e54c77b468375e35a898ed.zip
Docker: Use close sections when working with jessie-backports
Making the jessie-backports repository globally available might cause problems when installing packages which have mixed versions. This was observed with the following packages which could not be installed when jessie-backports was listed always in /etc/apt/sources.list * libnl-3-200 * libnl-3-dev * libnl-genl-3-200 * libnl-genl-3-dev
Diffstat (limited to 'docker')
-rw-r--r--docker/Dockerfile40
-rw-r--r--docker/sources.list4
2 files changed, 30 insertions, 14 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 21b38417..ebb998c1 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -21,12 +21,6 @@ LABEL authors="VyOS Maintainers <maintainers@vyos.io>"
ENV DEBIAN_FRONTEND noninteractive
-COPY sources.list /etc/apt/sources.list
-COPY no--check-valid-until /etc/apt/apt.conf.d/
-COPY vyos-dev.key /tmp/vyos-dev.key
-
-RUN apt-key add /tmp/vyos-dev.key
-
# Standard shell should be bash not dash
RUN echo "dash dash/sh boolean false" | debconf-set-selections && \
dpkg-reconfigure dash
@@ -73,11 +67,28 @@ RUN apt-get update && apt-get install -y \
debhelper \
jq
+#
+# Setup Debian Jessie Backports repository
+#
+COPY no--check-valid-until /etc/apt/apt.conf.d/
+RUN echo "deb http://archive.debian.org/debian/ jessie-backports main" \
+ > /etc/apt/sources.list.d/jessie-backports.list
+
RUN apt-get update && apt-get install -y -t jessie-backports \
python3-git \
python3-pip \
gosu
+# Package needed for mdns-repeater
+RUN apt-get update && apt-get install -y -t jessie-backports \
+ dh-systemd
+
+#
+# Remove Debian Jessie Backports repository
+#
+RUN rm -f /etc/apt/sources.list.d/jessie-backports.list \
+ /etc/apt/apt.conf.d/no--check-valid-until
+
#
# Building libvyosconf requires a full configured OPAM/OCaml setup
#
@@ -124,10 +135,6 @@ RUN eval $(opam env --root=/opt/opam --set-root) && \
dpkg-buildpackage -uc -us -tc -b && \
dpkg -i ../libvyosconfig0_*_amd64.deb
-# Package needed for mdns-repeater
-RUN apt-get update && apt-get install -y -t jessie-backports \
- dh-systemd
-
# Packages needed for vyatta-cfg
RUN apt-get update && apt-get install -y \
libglib2.0-dev \
@@ -188,6 +195,14 @@ RUN export RTRLIB_VERSION="0.6.3" && \
cd /tmp/rtrlib-${RTRLIB_VERSION} && dpkg-buildpackage -uc -us -tc -b && \
dpkg -i ../librtr*_amd64.deb ../librtr*_all.deb
+#
+# Setup VyOS Debian repository
+#
+COPY vyos-dev.key /tmp/vyos-dev.key
+RUN apt-key add /tmp/vyos-dev.key
+RUN echo "deb http://dev.packages.vyos.net/repositories/current/debian/ current main" \
+ > /etc/apt/sources.list.d/vyos.list
+
# Packages needed to build frr itself
# libyang-dev packages are hsoted on dev.packages.vyos.net see
# https://github.com/FRRouting/frr/blob/master/doc/developer/building-libyang.rst
@@ -203,6 +218,11 @@ RUN apt-get update && apt-get install -y \
python3-pytest \
texinfo
+#
+# Cleanup VyOS Debian Repository
+#
+RUN rm -f /etc/apt/sources.list.d/vyos.list
+
# Packages needed for conntrack-tools
RUN apt-get update && apt-get install -y \
libnetfilter-conntrack-dev \
diff --git a/docker/sources.list b/docker/sources.list
deleted file mode 100644
index ec827988..00000000
--- a/docker/sources.list
+++ /dev/null
@@ -1,4 +0,0 @@
-deb http://deb.debian.org/debian/ jessie main
-deb http://deb.debian.org/debian-security/ jessie/updates main
-deb http://archive.debian.org/debian/ jessie-backports main
-deb http://dev.packages.vyos.net/repositories/current/debian/ current main