From ec609b409a74b0f531b1eba43bb09e22db76ee10 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 7 Apr 2019 12:46:26 +0200 Subject: Docker: update build system to Debian Buster --- docker/Dockerfile | 38 ++++++++------------------------------ docker/no--check-valid-until | 1 - docker/sources.list | 4 ---- 3 files changed, 8 insertions(+), 35 deletions(-) delete mode 100644 docker/no--check-valid-until delete mode 100644 docker/sources.list (limited to 'docker') diff --git a/docker/Dockerfile b/docker/Dockerfile index 36895335..9101a52e 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -16,17 +16,11 @@ # Must be run with --privileged flag, recommended to run the container with a # volume mapped in order to easy export images -FROM debian:jessie +FROM debian:buster LABEL authors="VyOS Maintainers " 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 @@ -69,13 +63,12 @@ RUN apt-get update && apt-get install -y \ python3-coverage \ python3-sphinx \ python3-pystache \ - pkg-config \ - debhelper - -RUN apt-get update && apt-get install -y -t jessie-backports \ python3-git \ python3-pip \ - gosu + pkg-config \ + debhelper \ + gosu \ + live-build # # Building libvyosconf requires a full configured OPAM/OCaml setup @@ -124,7 +117,7 @@ RUN eval $(opam env --root=/opt/opam --set-root) && \ dpkg -i ../libvyosconfig0_*_amd64.deb # Package needed for mdns-repeater -RUN apt-get update && apt-get install -y -t jessie-backports \ +RUN apt-get update && apt-get install -y \ dh-systemd # Packages needed for vyatta-cfg @@ -161,7 +154,6 @@ RUN apt-get update && apt-get install -y \ # Packages needed for kernel RUN apt-get update && apt-get install -y \ - kernel-package \ libncurses5-dev \ flex \ bison \ @@ -224,16 +216,10 @@ RUN apt-get update && apt-get install -y \ # Packages needed for ipaddrcheck RUN apt-get update && apt-get install -y \ + libcidr0 \ + libcidr-dev \ check -# As there is no Debian Jessie/Stretch package for libcidr available but this -# is required for ipaddrcheck we have to build it from source -RUN git clone https://github.com/wikimedia/analytics-libcidr.git && \ - cd analytics-libcidr && \ - git checkout 026c611d90a1 && \ - dpkg-buildpackage -uc -us -tc -b && \ - dpkg -i ../libcidr*.deb - # Packages needed for lldpd RUN apt-get update && apt-get install -y \ libbsd-dev \ @@ -269,14 +255,6 @@ RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \ xmlto -# Update live-build -RUN echo 'deb http://ftp.debian.org/debian stretch main' | tee -a /etc/apt/sources.list.d/stretch.list && \ - apt-get update && apt-get install -y -t stretch \ - live-build && \ - rm -f /etc/apt/sources.list.d/stretch.list && \ - apt-get update && \ - rm -rf /var/lib/apt/lists/* - # Install packer RUN apt-get update && apt-get install -y \ jq diff --git a/docker/no--check-valid-until b/docker/no--check-valid-until deleted file mode 100644 index 27ed79f3..00000000 --- a/docker/no--check-valid-until +++ /dev/null @@ -1 +0,0 @@ -Acquire::Check-Valid-Until "0"; 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 -- cgit v1.2.3 From 369220ab4cdd70c0982b75894dd03c2c23c74c0d Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 25 Apr 2019 17:47:48 +0200 Subject: Docker: add python-setuptools as dependency of vyos-strongswan --- docker/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'docker') diff --git a/docker/Dockerfile b/docker/Dockerfile index 9101a52e..26fa9f85 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -245,7 +245,8 @@ RUN apt-get update && apt-get install -y \ libsqlite3-dev \ dh-apparmor \ gperf \ - libsystemd-dev + libsystemd-dev \ + python-setuptools # Packages needed for vyos-opennhrp RUN apt-get update && apt-get install -y \ -- cgit v1.2.3 From 3461366285233f2b3237f4a7c88c1da58f24a53d Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 25 Apr 2019 18:06:08 +0200 Subject: Docker: add bc, kmod as dependency of vyos-kernel --- docker/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'docker') diff --git a/docker/Dockerfile b/docker/Dockerfile index 26fa9f85..e43c6bbd 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -157,7 +157,9 @@ RUN apt-get update && apt-get install -y \ libncurses5-dev \ flex \ bison \ - libelf-dev + libelf-dev \ + bc \ + kmod # Packages needed for vyos-accel-ppp RUN apt-get update && apt-get install -y \ -- cgit v1.2.3 From 4e37abb232deebe68cbdf7e550305c150807be64 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Fri, 26 Apr 2019 18:32:40 +0200 Subject: Docker: fix libmysqlclient-dev package name --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docker') diff --git a/docker/Dockerfile b/docker/Dockerfile index a7d18fef..c23c41f3 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -142,7 +142,7 @@ RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \ libpcap-dev \ libpq-dev \ - libmysqlclient-dev \ + default-libmysqlclient-dev \ libgeoip-dev \ librabbitmq-dev \ libjansson-dev \ -- cgit v1.2.3 From eb4b45134875f8f9446f0ff39ac1ca02325a0bdf Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Fri, 26 Apr 2019 18:43:08 +0200 Subject: Docker: remove non-required dev.packages.vyos.net repo Debian Buster ships all required packages and thus we do not need to fallback to dev.packages.vyos.net for help. --- docker/Dockerfile | 13 ------------- docker/vyos-dev.key | 32 -------------------------------- 2 files changed, 45 deletions(-) delete mode 100644 docker/vyos-dev.key (limited to 'docker') diff --git a/docker/Dockerfile b/docker/Dockerfile index c23c41f3..c5e0b4d2 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -182,14 +182,6 @@ 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 @@ -205,11 +197,6 @@ 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/vyos-dev.key b/docker/vyos-dev.key deleted file mode 100644 index a6522e36..00000000 --- a/docker/vyos-dev.key +++ /dev/null @@ -1,32 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.12 (GNU/Linux) - -mQENBFOQPGwBCADjm8Oq3kaJQh0rI33XVfd9mNq5ffay884SlDCbG1hkLVf8tnGV -cjH7/nFfJdW/6Gr4dj4LQuHHnin5QeWnlHfuOySlOEsJCNP5dm14oEjy7epSXOv2 -A3m2tPDDqwMgfrOyw1gN+Clit9QIujiRzbcakqearyNxcVNvinIVunNiWbAyIhvc -uI6yfMjno4q/O83c7e1zBqJj9t9guQjBuqaJrmZVf985/6ue9yWzSI4JtzxVmhKI -dfCxHWE7BiEt2hnZPSVGcb4q6cBrkpcra7Ny55eoyN51wQGokPv3a9/8b3r5speR -gene2MTvD/3eZOtTvMN000f/gJX4E6o8xx+fABEBAAG0R1Z5T1MgTWFpbnRhaW5l -cnMgKERldmVsb3BtZW50IGFuZCB0ZXN0aW5nIHJlcG9zKSA8bWFpbnRhaW5lcnNA -dnlvcy5uZXQ+iQE4BBMBAgAiBQJTkDxsAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIe -AQIXgAAKCRAywkm9DfBLXJbHB/4xlwn+6cZGEWWNZgXwUTMeHubZItl1o3Tbrzaa -E3EqYyHJMYb3gBLOomlw7JLw5qT/247tlPC8ricl+BpeE5vYA3a08mIpcymROFh6 -pKJLNvdZHjrVN9yH2xYifI5sIDyuPga8Bgq/BMRiB1ragS/on2aUs75+tsEI32NI -JO8+jIav0Nd6n/Wmw55ioTXS3fx6VDb64D80luOf1ve5LFDs8Oz2I+ZjSf7mPMY/ -b9qQHNb/300k/tIeK2F4G7LFu6o/1YMlrv0Ry7j9BsLzIkmTh0pX4mSVvF6IrxsZ -WJRKu3uQDH2qccjptZDq4jHo/ow+aWT8rakjOgL9nJgKD5u/uQENBFOQPGwBCAC0 -zHpsmcfUIDyflGL+vwHV/3L02/vItHXfIkugL+wFB9C9i6nWA1KqNJwqNflJLGQF -y+vHXs0oa3oMKj7S3p2zTbuU8s9Vz2Cg5c15sy7yGjh/LTwVOR5ZJrgbRJxTTp9K -j5bkrx/DbDjIQ5szyjZ5N1ZAUyUx5Z/xMB3mTnLxDASvaoq+/F6WNcYY7NzjI7M0 -SFtnZLj6MFUVTmSbyYdGQc/Cxu5Utl7WKJUqHW5z10vJruZsdKV2+vf98yqhAJ+v -wPhKUoVD+KtCH/CrHFrVq0hCKIMtyPLtaTeR/QnCNDEsV4p82HB9KQOYEADEL3/A -a7Dntf3Xi+5eO/3MlnshABEBAAGJAR8EGAECAAkFAlOQPGwCGwwACgkQMsJJvQ3w -S1z+wwf9GnVn9GhbB1FhKQdavljp9rUzz8FvH3tRpftdhhJ8B0PVAMl4QRcIXrgD -nyd1K9ggzyWa4Z/9PygvH0Njv4YWlZh900wei9uVD8am1ncgQ/Jqlb36WvXyr8W/ -VPzQDtKAOkUz6RhKQ4V6I0PBK9nGeqeFkeH1bF1uGXkKpa0hGWffyOT1VasaZVXT -UN4VAYNzBwkoU0mIYK73CPi7e4YJrtOp/i8MGDL3pxKaZEEZJdc4/dZassqBuwSG -MRr2kecj9f53KWI0jLQdLgTMJQxscotfzhsWoF/842sUCbezwV3/4FtBhlNeqUHA -c9HOeh3wbjjt4uONvxeleE+jM9v63Q== -=gflA ------END PGP PUBLIC KEY BLOCK----- - -- cgit v1.2.3 From 94c96194a53b6a0c717fc287357bd8945ca3307e Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Fri, 26 Apr 2019 18:57:49 +0200 Subject: Docker: remove comment to elimiate false positive during grep --- docker/Dockerfile | 1 - 1 file changed, 1 deletion(-) (limited to 'docker') diff --git a/docker/Dockerfile b/docker/Dockerfile index c5e0b4d2..792a45de 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -183,7 +183,6 @@ RUN export RTRLIB_VERSION="0.6.3" && \ dpkg -i ../librtr*_amd64.deb ../librtr*_all.deb # 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 # for more info RUN apt-get update && apt-get install -y \ -- cgit v1.2.3 From 2657f076b4bc0e5bc1b989cfb4cb8e8204ecc36c Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 23 May 2019 21:01:05 +0200 Subject: Docker: replace libmysqld-dev with libmariadb-dev for net-snmp --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docker') diff --git a/docker/Dockerfile b/docker/Dockerfile index bfb56e50..733b16a4 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -274,7 +274,7 @@ RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \ python-all \ python2.7-dev \ - libmysqld-dev + libmariadb-dev # Install packer RUN export LATEST="$(curl -s https://checkpoint-api.hashicorp.com/v1/check/packer | \ -- cgit v1.2.3 From dee58b509635af77a832ed124390b9d1f332cb52 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 20 Jul 2019 20:25:01 +0200 Subject: Docker: add pached debootstrap --- docker/Dockerfile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'docker') diff --git a/docker/Dockerfile b/docker/Dockerfile index 733b16a4..69c76ddb 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -283,6 +283,22 @@ RUN export LATEST="$(curl -s https://checkpoint-api.hashicorp.com/v1/check/packe curl -K- | gzip -d > /usr/bin/packer && \ chmod +x /usr/bin/packer +# +# live-build: building in docker fails with mounting /proc | /sys +# +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=919659 +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=921815 +# https://salsa.debian.org/installer-team/debootstrap/merge_requests/26 +# +RUN wget https://salsa.debian.org/klausenbusk-guest/debootstrap/commit/a9a603b17cadbf52cb98cde0843dc9f23a08b0da.patch && \ + git clone https://salsa.debian.org/installer-team/debootstrap && \ + cd debootstrap && \ + git checkout 1.0.114 && \ + patch -p1 < ../a9a603b17cadbf52cb98cde0843dc9f23a08b0da.patch && \ + dch -n "Applying fix for docker image compile" && \ + dpkg-buildpackage -us -uc && \ + sudo dpkg -i ../debootstrap*.deb + # Allow password-less 'sudo' for all users in group 'sudo' RUN sed "s/^%sudo.*/%sudo\tALL=(ALL) NOPASSWD:ALL/g" -i /etc/sudoers && \ chmod a+s /usr/sbin/useradd /usr/sbin/groupadd /usr/sbin/gosu /usr/sbin/usermod -- cgit v1.2.3 From b2aa30e203e85b9a44b64fd0076225e60123fd46 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 19 Sep 2019 08:33:38 +0200 Subject: Docker: adjustments for Debian 10 (Buster) --- docker/Dockerfile-arm64 | 113 ++++++++++++++++++------------------------------ docker/Dockerfile-armhf | 113 ++++++++++++++++++------------------------------ 2 files changed, 83 insertions(+), 143 deletions(-) (limited to 'docker') diff --git a/docker/Dockerfile-arm64 b/docker/Dockerfile-arm64 index 9625058b..c770dd6a 100644 --- a/docker/Dockerfile-arm64 +++ b/docker/Dockerfile-arm64 @@ -1,4 +1,4 @@ -# Copyright (C) 2018 VyOS maintainers and contributors +# Copyright (C) 2019 VyOS maintainers and contributors # # This program is free software; you can redistribute it and/or modify # in order to easy exprort images built to "external" world @@ -16,15 +16,11 @@ # Must be run with --privileged flag, recommended to run the container with a # volume mapped in order to easy export images -FROM multiarch/debian-debootstrap:arm64-jessie-slim +FROM multiarch/debian-debootstrap:arm64-buster-slim LABEL authors="VyOS Maintainers " ENV DEBIAN_FRONTEND noninteractive -COPY no--check-valid-until /etc/apt/apt.conf.d/ -RUN echo "deb http://archive.debian.org/debian jessie main" \ - > /etc/apt/sources.list - # Standard shell should be bash not dash RUN echo "dash dash/sh boolean false" | debconf-set-selections && \ dpkg-reconfigure dash @@ -64,40 +60,18 @@ RUN apt-get update && apt-get install -y \ python3-coverage \ python3-sphinx \ python3-pystache \ + python3-git \ + python3-pip \ pkg-config \ debhelper \ + gosu \ + live-build \ 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 - -RUN echo "deb http://deb.debian.org/debian buster main" \ - > /etc/apt/sources.list.d/buster.list - -RUN apt-get update && apt-get install -y \ - golang \ - gosu - -RUN rm -f /etc/apt/sources.list.d/buster.list - # Package needed for mdns-repeater -RUN apt-get update && apt-get install -y -t jessie-backports \ +RUN apt-get update && apt-get install -y \ 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 # @@ -142,7 +116,7 @@ RUN eval $(opam env --root=/opt/opam --set-root) && \ git clone https://github.com/vyos/libvyosconfig.git && \ cd libvyosconfig && git checkout 9a80a5d3 && \ dpkg-buildpackage -uc -us -tc -b && \ -dpkg -i ../libvyosconfig0_*_arm64.deb + dpkg -i ../libvyosconfig0_*_amd64.deb # Packages needed for vyatta-cfg RUN apt-get update && apt-get install -y \ @@ -152,9 +126,12 @@ RUN apt-get update && apt-get install -y \ # Packages needed for vyatta-iproute RUN apt-get update && apt-get install -y \ + iptables-dev \ libatm1-dev \ + libcap-dev \ libdb-dev \ - iptables-dev + libelf-dev \ + libselinux1-dev # Packages needed for vyatta-webgui RUN apt-get update && apt-get install -y \ @@ -165,7 +142,7 @@ RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \ libpcap-dev \ libpq-dev \ - libmysqlclient-dev \ + default-libmysqlclient-dev \ libgeoip-dev \ librabbitmq-dev \ libjansson-dev \ @@ -178,11 +155,12 @@ RUN apt-get update && apt-get install -y \ # Packages needed for kernel RUN apt-get update && apt-get install -y \ - kernel-package \ libncurses5-dev \ flex \ bison \ - libelf-dev + libelf-dev \ + bc \ + kmod # Packages needed for vyos-accel-ppp RUN apt-get update && apt-get install -y \ @@ -193,6 +171,7 @@ RUN apt-get update && apt-get install -y \ # Prerequisites for building rtrlib # see http://docs.frrouting.org/projects/dev-guide/en/latest/building-frr-for-debian8.html RUN apt-get update && apt-get install -y \ + graphviz \ doxygen \ libssh-dev \ libssl-dev @@ -202,18 +181,9 @@ RUN export RTRLIB_VERSION="0.6.3" && \ wget -P /tmp https://github.com/rtrlib/rtrlib/archive/v${RTRLIB_VERSION}.tar.gz && \ tar xf /tmp/v${RTRLIB_VERSION}.tar.gz -C /tmp && \ cd /tmp/rtrlib-${RTRLIB_VERSION} && dpkg-buildpackage -uc -us -tc -b && \ - dpkg -i ../librtr*_arm64.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 + dpkg -i ../librtr*_amd64.deb ../librtr*_all.deb # 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 # for more info RUN apt-get update && apt-get install -y \ @@ -227,11 +197,6 @@ 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 \ @@ -248,18 +213,16 @@ RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \ whois +# Packages needed for vyos-xe-guest-utilities +RUN apt-get update && apt-get install -y \ + golang + # Packages needed for ipaddrcheck RUN apt-get update && apt-get install -y \ + libcidr0 \ + libcidr-dev \ check -# As there is no Debian Jessie/Stretch package for libcidr available but this -# is required for ipaddrcheck we have to build it from source -RUN git clone https://github.com/wikimedia/analytics-libcidr.git && \ - cd analytics-libcidr && \ - git checkout 026c611d90a1 && \ - dpkg-buildpackage -uc -us -tc -b && \ - dpkg -i ../libcidr*.deb - # Packages needed for lldpd RUN apt-get update && apt-get install -y \ libbsd-dev \ @@ -312,23 +275,31 @@ RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \ python-all \ python2.7-dev \ - libmysqld-dev - -# Update live-build -RUN echo 'deb http://ftp.debian.org/debian stretch main' | tee -a /etc/apt/sources.list.d/stretch.list && \ - apt-get update && apt-get install -y -t stretch \ - live-build && \ - rm -f /etc/apt/sources.list.d/stretch.list && \ - apt-get update && \ - rm -rf /var/lib/apt/lists/* + libmariadb-dev # Install packer RUN export LATEST="$(curl -s https://checkpoint-api.hashicorp.com/v1/check/packer | \ jq -r -M '.current_version')"; \ - echo "url https://releases.hashicorp.com/packer/"$LATEST"/packer_"$LATEST"_linux_arm.zip" |\ + echo "url https://releases.hashicorp.com/packer/"$LATEST"/packer_"$LATEST"_linux_arm64.zip" |\ curl -K- | gzip -d > /usr/bin/packer && \ chmod +x /usr/bin/packer +# +# live-build: building in docker fails with mounting /proc | /sys +# +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=919659 +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=921815 +# https://salsa.debian.org/installer-team/debootstrap/merge_requests/26 +# +RUN wget https://salsa.debian.org/klausenbusk-guest/debootstrap/commit/a9a603b17cadbf52cb98cde0843dc9f23a08b0da.patch && \ + git clone https://salsa.debian.org/installer-team/debootstrap && \ + cd debootstrap && \ + git checkout 1.0.114 && \ + patch -p1 < ../a9a603b17cadbf52cb98cde0843dc9f23a08b0da.patch && \ + dch -n "Applying fix for docker image compile" && \ + dpkg-buildpackage -us -uc && \ + sudo dpkg -i ../debootstrap*.deb + # Allow password-less 'sudo' for all users in group 'sudo' RUN sed "s/^%sudo.*/%sudo\tALL=(ALL) NOPASSWD:ALL/g" -i /etc/sudoers && \ chmod a+s /usr/sbin/useradd /usr/sbin/groupadd /usr/sbin/gosu /usr/sbin/usermod diff --git a/docker/Dockerfile-armhf b/docker/Dockerfile-armhf index 71b5b8bf..f07086e7 100644 --- a/docker/Dockerfile-armhf +++ b/docker/Dockerfile-armhf @@ -1,4 +1,4 @@ -# Copyright (C) 2018 VyOS maintainers and contributors +# Copyright (C) 2019 VyOS maintainers and contributors # # This program is free software; you can redistribute it and/or modify # in order to easy exprort images built to "external" world @@ -16,17 +16,11 @@ # Must be run with --privileged flag, recommended to run the container with a # volume mapped in order to easy export images -FROM multiarch/debian-debootstrap:armhf-jessie-slim +FROM multiarch/debian-debootstrap:armhf-buster-slim LABEL authors="VyOS Maintainers " ENV DEBIAN_FRONTEND noninteractive -COPY no--check-valid-until /etc/apt/apt.conf.d/ -RUN echo "deb http://deb.debian.org/debian jessie main" \ - > /etc/apt/sources.list \ - && echo "deb http://security.debian.org/debian-security jessie/updates main" \ - >> /etc/apt/sources.list - # Standard shell should be bash not dash RUN echo "dash dash/sh boolean false" | debconf-set-selections && \ dpkg-reconfigure dash @@ -66,40 +60,18 @@ RUN apt-get update && apt-get install -y \ python3-coverage \ python3-sphinx \ python3-pystache \ + python3-git \ + python3-pip \ pkg-config \ debhelper \ + gosu \ + live-build \ 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 - -RUN echo "deb http://deb.debian.org/debian buster main" \ - > /etc/apt/sources.list.d/buster.list - -RUN apt-get update && apt-get install -y \ - golang \ - gosu - -RUN rm -f /etc/apt/sources.list.d/buster.list - # Package needed for mdns-repeater -RUN apt-get update && apt-get install -y -t jessie-backports \ +RUN apt-get update && apt-get install -y \ 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 # @@ -144,7 +116,7 @@ RUN eval $(opam env --root=/opt/opam --set-root) && \ git clone https://github.com/vyos/libvyosconfig.git && \ cd libvyosconfig && git checkout 9a80a5d3 && \ dpkg-buildpackage -uc -us -tc -b && \ - dpkg -i ../libvyosconfig0_*_armhf.deb + dpkg -i ../libvyosconfig0_*_amd64.deb # Packages needed for vyatta-cfg RUN apt-get update && apt-get install -y \ @@ -154,9 +126,12 @@ RUN apt-get update && apt-get install -y \ # Packages needed for vyatta-iproute RUN apt-get update && apt-get install -y \ + iptables-dev \ libatm1-dev \ + libcap-dev \ libdb-dev \ - iptables-dev + libelf-dev \ + libselinux1-dev # Packages needed for vyatta-webgui RUN apt-get update && apt-get install -y \ @@ -167,7 +142,7 @@ RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \ libpcap-dev \ libpq-dev \ - libmysqlclient-dev \ + default-libmysqlclient-dev \ libgeoip-dev \ librabbitmq-dev \ libjansson-dev \ @@ -180,11 +155,12 @@ RUN apt-get update && apt-get install -y \ # Packages needed for kernel RUN apt-get update && apt-get install -y \ - kernel-package \ libncurses5-dev \ flex \ bison \ - libelf-dev + libelf-dev \ + bc \ + kmod # Packages needed for vyos-accel-ppp RUN apt-get update && apt-get install -y \ @@ -195,6 +171,7 @@ RUN apt-get update && apt-get install -y \ # Prerequisites for building rtrlib # see http://docs.frrouting.org/projects/dev-guide/en/latest/building-frr-for-debian8.html RUN apt-get update && apt-get install -y \ + graphviz \ doxygen \ libssh-dev \ libssl-dev @@ -204,18 +181,9 @@ RUN export RTRLIB_VERSION="0.6.3" && \ wget -P /tmp https://github.com/rtrlib/rtrlib/archive/v${RTRLIB_VERSION}.tar.gz && \ tar xf /tmp/v${RTRLIB_VERSION}.tar.gz -C /tmp && \ cd /tmp/rtrlib-${RTRLIB_VERSION} && dpkg-buildpackage -uc -us -tc -b && \ - dpkg -i ../librtr*_armhf.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 + dpkg -i ../librtr*_amd64.deb ../librtr*_all.deb # 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 # for more info RUN apt-get update && apt-get install -y \ @@ -229,11 +197,6 @@ 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 \ @@ -250,18 +213,16 @@ RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \ whois +# Packages needed for vyos-xe-guest-utilities +RUN apt-get update && apt-get install -y \ + golang + # Packages needed for ipaddrcheck RUN apt-get update && apt-get install -y \ + libcidr0 \ + libcidr-dev \ check -# As there is no Debian Jessie/Stretch package for libcidr available but this -# is required for ipaddrcheck we have to build it from source -RUN git clone https://github.com/wikimedia/analytics-libcidr.git && \ - cd analytics-libcidr && \ - git checkout 026c611d90a1 && \ - dpkg-buildpackage -uc -us -tc -b && \ - dpkg -i ../libcidr*.deb - # Packages needed for lldpd RUN apt-get update && apt-get install -y \ libbsd-dev \ @@ -314,15 +275,7 @@ RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \ python-all \ python2.7-dev \ - libmysqld-dev - -# Update live-build -RUN echo 'deb http://ftp.debian.org/debian stretch main' | tee -a /etc/apt/sources.list.d/stretch.list && \ - apt-get update && apt-get install -y -t stretch \ - live-build && \ - rm -f /etc/apt/sources.list.d/stretch.list && \ - apt-get update && \ - rm -rf /var/lib/apt/lists/* + libmariadb-dev # Install packer RUN export LATEST="$(curl -s https://checkpoint-api.hashicorp.com/v1/check/packer | \ @@ -331,6 +284,22 @@ RUN export LATEST="$(curl -s https://checkpoint-api.hashicorp.com/v1/check/packe curl -K- | gzip -d > /usr/bin/packer && \ chmod +x /usr/bin/packer +# +# live-build: building in docker fails with mounting /proc | /sys +# +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=919659 +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=921815 +# https://salsa.debian.org/installer-team/debootstrap/merge_requests/26 +# +RUN wget https://salsa.debian.org/klausenbusk-guest/debootstrap/commit/a9a603b17cadbf52cb98cde0843dc9f23a08b0da.patch && \ + git clone https://salsa.debian.org/installer-team/debootstrap && \ + cd debootstrap && \ + git checkout 1.0.114 && \ + patch -p1 < ../a9a603b17cadbf52cb98cde0843dc9f23a08b0da.patch && \ + dch -n "Applying fix for docker image compile" && \ + dpkg-buildpackage -us -uc && \ + sudo dpkg -i ../debootstrap*.deb + # Allow password-less 'sudo' for all users in group 'sudo' RUN sed "s/^%sudo.*/%sudo\tALL=(ALL) NOPASSWD:ALL/g" -i /etc/sudoers && \ chmod a+s /usr/sbin/useradd /usr/sbin/groupadd /usr/sbin/gosu /usr/sbin/usermod -- cgit v1.2.3 From 1bbbdef6778f85b8e91882239ee070b55f48e5b6 Mon Sep 17 00:00:00 2001 From: Kim Hagen Date: Thu, 19 Sep 2019 10:31:59 +0200 Subject: add hooks for autobuild --- docker/Dockerfile-arm64 | 314 --------------------------------------- docker/Dockerfile-armhf | 314 --------------------------------------- docker/arm64/Dockerfile | 314 +++++++++++++++++++++++++++++++++++++++ docker/arm64/hooks/post_checkout | 3 + docker/arm64/hooks/pre_build | 4 + docker/armhf/Dockerfile | 314 +++++++++++++++++++++++++++++++++++++++ docker/armhf/hooks/post_checkout | 3 + docker/armhf/hooks/pre_build | 4 + 8 files changed, 642 insertions(+), 628 deletions(-) delete mode 100644 docker/Dockerfile-arm64 delete mode 100644 docker/Dockerfile-armhf create mode 100644 docker/arm64/Dockerfile create mode 100644 docker/arm64/hooks/post_checkout create mode 100644 docker/arm64/hooks/pre_build create mode 100644 docker/armhf/Dockerfile create mode 100644 docker/armhf/hooks/post_checkout create mode 100644 docker/armhf/hooks/pre_build (limited to 'docker') diff --git a/docker/Dockerfile-arm64 b/docker/Dockerfile-arm64 deleted file mode 100644 index c770dd6a..00000000 --- a/docker/Dockerfile-arm64 +++ /dev/null @@ -1,314 +0,0 @@ -# Copyright (C) 2019 VyOS maintainers and contributors -# -# This program is free software; you can redistribute it and/or modify -# in order to easy exprort images built to "external" world -# it under the terms of the GNU General Public License version 2 or later as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Must be run with --privileged flag, recommended to run the container with a -# volume mapped in order to easy export images - -FROM multiarch/debian-debootstrap:arm64-buster-slim -LABEL authors="VyOS Maintainers " - -ENV DEBIAN_FRONTEND noninteractive - -# Standard shell should be bash not dash -RUN echo "dash dash/sh boolean false" | debconf-set-selections && \ - dpkg-reconfigure dash - -RUN apt-get update && apt-get install -y \ - dialog \ - apt-utils \ - locales - -RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen -ENV LANG en_US.utf8 - -RUN apt-get update && apt-get install -y \ - vim \ - git \ - curl \ - make \ - sudo \ - mc \ - pbuilder \ - devscripts \ - squashfs-tools \ - autoconf \ - automake \ - dpkg-dev \ - genisoimage \ - lsb-release \ - fakechroot \ - libtool \ - libapt-pkg-dev \ - parted \ - kpartx \ - quilt \ - python3-lxml \ - python3-setuptools \ - python3-nose \ - python3-coverage \ - python3-sphinx \ - python3-pystache \ - python3-git \ - python3-pip \ - pkg-config \ - debhelper \ - gosu \ - live-build \ - jq - -# Package needed for mdns-repeater -RUN apt-get update && apt-get install -y \ - dh-systemd - -# -# Building libvyosconf requires a full configured OPAM/OCaml setup -# -RUN apt-get update && apt-get install -y \ - libffi-dev \ - libpcre3-dev - -RUN curl https://raw.githubusercontent.com/ocaml/opam/2.0.2/shell/install.sh --output /tmp/opam_install.sh && \ - sed -i 's/read BINDIR/BINDIR=""/' /tmp/opam_install.sh && sh /tmp/opam_install.sh && \ - opam init --root=/opt/opam --comp=4.07.0 --disable-sandboxing - -RUN eval $(opam env --root=/opt/opam --set-root) && \ - opam install -y \ - oasis - -RUN eval $(opam env --root=/opt/opam --set-root) && opam install -y \ - fileutils \ - lwt \ - lwt_ppx \ - lwt_log \ - ocplib-endian \ - ounit \ - pcre \ - ppx_deriving_yojson \ - sha \ - toml \ - xml-light \ - batteries \ - ocaml-protoc \ - ctypes-foreign \ - menhir - -RUN eval $(opam env --root=/opt/opam --set-root) && opam install -y \ - ctypes - -# Build VyConf which is required to build libvyosconfig -RUN eval $(opam env --root=/opt/opam --set-root) && \ - opam pin add vyconf https://github.com/vyos/vyconf.git#51d79a3f -y - -# Build libvyosconfig -RUN eval $(opam env --root=/opt/opam --set-root) && \ - git clone https://github.com/vyos/libvyosconfig.git && \ - cd libvyosconfig && git checkout 9a80a5d3 && \ - dpkg-buildpackage -uc -us -tc -b && \ - dpkg -i ../libvyosconfig0_*_amd64.deb - -# Packages needed for vyatta-cfg -RUN apt-get update && apt-get install -y \ - libglib2.0-dev \ - libperl-dev \ - libboost-filesystem-dev - -# Packages needed for vyatta-iproute -RUN apt-get update && apt-get install -y \ - iptables-dev \ - libatm1-dev \ - libcap-dev \ - libdb-dev \ - libelf-dev \ - libselinux1-dev - -# Packages needed for vyatta-webgui -RUN apt-get update && apt-get install -y \ - libexpat1-dev \ - subversion - -# Packages needed for pmacct -RUN apt-get update && apt-get install -y \ - libpcap-dev \ - libpq-dev \ - default-libmysqlclient-dev \ - libgeoip-dev \ - librabbitmq-dev \ - libjansson-dev \ - librdkafka-dev \ - libnetfilter-log-dev - -# Pavkages needed for wireguard -RUN apt-get update && apt-get install -y \ - libmnl-dev - -# Packages needed for kernel -RUN apt-get update && apt-get install -y \ - libncurses5-dev \ - flex \ - bison \ - libelf-dev \ - bc \ - kmod - -# Packages needed for vyos-accel-ppp -RUN apt-get update && apt-get install -y \ - cdbs \ - cmake \ - liblua5.1-dev - -# Prerequisites for building rtrlib -# see http://docs.frrouting.org/projects/dev-guide/en/latest/building-frr-for-debian8.html -RUN apt-get update && apt-get install -y \ - graphviz \ - doxygen \ - libssh-dev \ - libssl-dev - -# Build rtrlib release 0.6.3 -RUN export RTRLIB_VERSION="0.6.3" && \ - wget -P /tmp https://github.com/rtrlib/rtrlib/archive/v${RTRLIB_VERSION}.tar.gz && \ - tar xf /tmp/v${RTRLIB_VERSION}.tar.gz -C /tmp && \ - cd /tmp/rtrlib-${RTRLIB_VERSION} && dpkg-buildpackage -uc -us -tc -b && \ - dpkg -i ../librtr*_amd64.deb ../librtr*_all.deb - -# Packages needed to build frr itself -# https://github.com/FRRouting/frr/blob/master/doc/developer/building-libyang.rst -# for more info -RUN apt-get update && apt-get install -y \ - libyang-dev \ - libyang0.16 \ - chrpath \ - install-info \ - libjson-c-dev \ - libpython3-dev \ - python3-dev \ - python3-pytest \ - texinfo - -# Packages needed for conntrack-tools -RUN apt-get update && apt-get install -y \ - libnetfilter-conntrack-dev \ - libnetfilter-cthelper0-dev \ - libnetfilter-cttimeout-dev \ - libnetfilter-queue-dev - -# Packages needed for hvinfo -RUN apt-get update && apt-get install -y \ - gnat \ - gprbuild - -# Packages needed for vyos-1x -RUN apt-get update && apt-get install -y \ - whois - -# Packages needed for vyos-xe-guest-utilities -RUN apt-get update && apt-get install -y \ - golang - -# Packages needed for ipaddrcheck -RUN apt-get update && apt-get install -y \ - libcidr0 \ - libcidr-dev \ - check - -# Packages needed for lldpd -RUN apt-get update && apt-get install -y \ - libbsd-dev \ - libevent-dev - -# Packages needed for vyatta-quagga -RUN apt-get update && apt-get install -y \ - libpam-dev \ - libcap-dev \ - libsnmp-dev \ - gawk - -# Packages needed for vyos-strongswan -RUN apt-get update && apt-get install -y \ - libkrb5-dev \ - libssl-dev \ - libxml2-dev \ - systemd \ - libcurl4-openssl-dev \ - libgcrypt20-dev \ - libgmp3-dev \ - libldap2-dev \ - libsqlite3-dev \ - dh-apparmor \ - gperf \ - libsystemd-dev \ - python3-stdeb \ - python-setuptools - -# Packages needed for vyos-opennhrp -RUN apt-get update && apt-get install -y \ - libc-ares-dev - -# Packages needed for ddclient -RUN apt-get update && apt-get install -y \ - xmlto - -# Packages needed for keepalived -RUN apt-get update && apt-get install -y \ - libnl-3-200 \ - libnl-3-dev \ - libnl-nf-3-200 \ - libnl-nf-3-dev \ - libipset-dev \ - libnl-genl-3-200 \ - libnl-genl-3-dev \ - libpopt-dev - -# Packages needed for net-snmp -RUN apt-get update && apt-get install -y \ - python-all \ - python2.7-dev \ - libmariadb-dev - -# Install packer -RUN export LATEST="$(curl -s https://checkpoint-api.hashicorp.com/v1/check/packer | \ - jq -r -M '.current_version')"; \ - echo "url https://releases.hashicorp.com/packer/"$LATEST"/packer_"$LATEST"_linux_arm64.zip" |\ - curl -K- | gzip -d > /usr/bin/packer && \ - chmod +x /usr/bin/packer - -# -# live-build: building in docker fails with mounting /proc | /sys -# -# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=919659 -# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=921815 -# https://salsa.debian.org/installer-team/debootstrap/merge_requests/26 -# -RUN wget https://salsa.debian.org/klausenbusk-guest/debootstrap/commit/a9a603b17cadbf52cb98cde0843dc9f23a08b0da.patch && \ - git clone https://salsa.debian.org/installer-team/debootstrap && \ - cd debootstrap && \ - git checkout 1.0.114 && \ - patch -p1 < ../a9a603b17cadbf52cb98cde0843dc9f23a08b0da.patch && \ - dch -n "Applying fix for docker image compile" && \ - dpkg-buildpackage -us -uc && \ - sudo dpkg -i ../debootstrap*.deb - -# Allow password-less 'sudo' for all users in group 'sudo' -RUN sed "s/^%sudo.*/%sudo\tALL=(ALL) NOPASSWD:ALL/g" -i /etc/sudoers && \ - chmod a+s /usr/sbin/useradd /usr/sbin/groupadd /usr/sbin/gosu /usr/sbin/usermod - -# Ensure sure all users have access to our OCAM installation -RUN echo "$(opam env --root=/opt/opam --set-root)" >> /etc/skel/.bashrc - -# Cleanup -RUN rm -rf /tmp/* - -COPY entrypoint.sh /usr/local/bin/entrypoint.sh -ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] diff --git a/docker/Dockerfile-armhf b/docker/Dockerfile-armhf deleted file mode 100644 index f07086e7..00000000 --- a/docker/Dockerfile-armhf +++ /dev/null @@ -1,314 +0,0 @@ -# Copyright (C) 2019 VyOS maintainers and contributors -# -# This program is free software; you can redistribute it and/or modify -# in order to easy exprort images built to "external" world -# it under the terms of the GNU General Public License version 2 or later as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Must be run with --privileged flag, recommended to run the container with a -# volume mapped in order to easy export images - -FROM multiarch/debian-debootstrap:armhf-buster-slim -LABEL authors="VyOS Maintainers " - -ENV DEBIAN_FRONTEND noninteractive - -# Standard shell should be bash not dash -RUN echo "dash dash/sh boolean false" | debconf-set-selections && \ - dpkg-reconfigure dash - -RUN apt-get update && apt-get install -y \ - dialog \ - apt-utils \ - locales - -RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen -ENV LANG en_US.utf8 - -RUN apt-get update && apt-get install -y \ - vim \ - git \ - curl \ - make \ - sudo \ - mc \ - pbuilder \ - devscripts \ - squashfs-tools \ - autoconf \ - automake \ - dpkg-dev \ - genisoimage \ - lsb-release \ - fakechroot \ - libtool \ - libapt-pkg-dev \ - parted \ - kpartx \ - quilt \ - python3-lxml \ - python3-setuptools \ - python3-nose \ - python3-coverage \ - python3-sphinx \ - python3-pystache \ - python3-git \ - python3-pip \ - pkg-config \ - debhelper \ - gosu \ - live-build \ - jq - -# Package needed for mdns-repeater -RUN apt-get update && apt-get install -y \ - dh-systemd - -# -# Building libvyosconf requires a full configured OPAM/OCaml setup -# -RUN apt-get update && apt-get install -y \ - libffi-dev \ - libpcre3-dev - -RUN curl https://raw.githubusercontent.com/ocaml/opam/2.0.2/shell/install.sh --output /tmp/opam_install.sh && \ - sed -i 's/read BINDIR/BINDIR=""/' /tmp/opam_install.sh && sh /tmp/opam_install.sh && \ - opam init --root=/opt/opam --comp=4.07.0 --disable-sandboxing - -RUN eval $(opam env --root=/opt/opam --set-root) && \ - opam install -y \ - oasis - -RUN eval $(opam env --root=/opt/opam --set-root) && opam install -y \ - fileutils \ - lwt \ - lwt_ppx \ - lwt_log \ - ocplib-endian \ - ounit \ - pcre \ - ppx_deriving_yojson \ - sha \ - toml \ - xml-light \ - batteries \ - ocaml-protoc \ - ctypes-foreign \ - menhir - -RUN eval $(opam env --root=/opt/opam --set-root) && opam install -y \ - ctypes - -# Build VyConf which is required to build libvyosconfig -RUN eval $(opam env --root=/opt/opam --set-root) && \ - opam pin add vyconf https://github.com/vyos/vyconf.git#51d79a3f -y - -# Build libvyosconfig -RUN eval $(opam env --root=/opt/opam --set-root) && \ - git clone https://github.com/vyos/libvyosconfig.git && \ - cd libvyosconfig && git checkout 9a80a5d3 && \ - dpkg-buildpackage -uc -us -tc -b && \ - dpkg -i ../libvyosconfig0_*_amd64.deb - -# Packages needed for vyatta-cfg -RUN apt-get update && apt-get install -y \ - libglib2.0-dev \ - libperl-dev \ - libboost-filesystem-dev - -# Packages needed for vyatta-iproute -RUN apt-get update && apt-get install -y \ - iptables-dev \ - libatm1-dev \ - libcap-dev \ - libdb-dev \ - libelf-dev \ - libselinux1-dev - -# Packages needed for vyatta-webgui -RUN apt-get update && apt-get install -y \ - libexpat1-dev \ - subversion - -# Packages needed for pmacct -RUN apt-get update && apt-get install -y \ - libpcap-dev \ - libpq-dev \ - default-libmysqlclient-dev \ - libgeoip-dev \ - librabbitmq-dev \ - libjansson-dev \ - librdkafka-dev \ - libnetfilter-log-dev - -# Pavkages needed for wireguard -RUN apt-get update && apt-get install -y \ - libmnl-dev - -# Packages needed for kernel -RUN apt-get update && apt-get install -y \ - libncurses5-dev \ - flex \ - bison \ - libelf-dev \ - bc \ - kmod - -# Packages needed for vyos-accel-ppp -RUN apt-get update && apt-get install -y \ - cdbs \ - cmake \ - liblua5.1-dev - -# Prerequisites for building rtrlib -# see http://docs.frrouting.org/projects/dev-guide/en/latest/building-frr-for-debian8.html -RUN apt-get update && apt-get install -y \ - graphviz \ - doxygen \ - libssh-dev \ - libssl-dev - -# Build rtrlib release 0.6.3 -RUN export RTRLIB_VERSION="0.6.3" && \ - wget -P /tmp https://github.com/rtrlib/rtrlib/archive/v${RTRLIB_VERSION}.tar.gz && \ - tar xf /tmp/v${RTRLIB_VERSION}.tar.gz -C /tmp && \ - cd /tmp/rtrlib-${RTRLIB_VERSION} && dpkg-buildpackage -uc -us -tc -b && \ - dpkg -i ../librtr*_amd64.deb ../librtr*_all.deb - -# Packages needed to build frr itself -# https://github.com/FRRouting/frr/blob/master/doc/developer/building-libyang.rst -# for more info -RUN apt-get update && apt-get install -y \ - libyang-dev \ - libyang0.16 \ - chrpath \ - install-info \ - libjson-c-dev \ - libpython3-dev \ - python3-dev \ - python3-pytest \ - texinfo - -# Packages needed for conntrack-tools -RUN apt-get update && apt-get install -y \ - libnetfilter-conntrack-dev \ - libnetfilter-cthelper0-dev \ - libnetfilter-cttimeout-dev \ - libnetfilter-queue-dev - -# Packages needed for hvinfo -RUN apt-get update && apt-get install -y \ - gnat \ - gprbuild - -# Packages needed for vyos-1x -RUN apt-get update && apt-get install -y \ - whois - -# Packages needed for vyos-xe-guest-utilities -RUN apt-get update && apt-get install -y \ - golang - -# Packages needed for ipaddrcheck -RUN apt-get update && apt-get install -y \ - libcidr0 \ - libcidr-dev \ - check - -# Packages needed for lldpd -RUN apt-get update && apt-get install -y \ - libbsd-dev \ - libevent-dev - -# Packages needed for vyatta-quagga -RUN apt-get update && apt-get install -y \ - libpam-dev \ - libcap-dev \ - libsnmp-dev \ - gawk - -# Packages needed for vyos-strongswan -RUN apt-get update && apt-get install -y \ - libkrb5-dev \ - libssl-dev \ - libxml2-dev \ - systemd \ - libcurl4-openssl-dev \ - libgcrypt20-dev \ - libgmp3-dev \ - libldap2-dev \ - libsqlite3-dev \ - dh-apparmor \ - gperf \ - libsystemd-dev \ - python3-stdeb \ - python-setuptools - -# Packages needed for vyos-opennhrp -RUN apt-get update && apt-get install -y \ - libc-ares-dev - -# Packages needed for ddclient -RUN apt-get update && apt-get install -y \ - xmlto - -# Packages needed for keepalived -RUN apt-get update && apt-get install -y \ - libnl-3-200 \ - libnl-3-dev \ - libnl-nf-3-200 \ - libnl-nf-3-dev \ - libipset-dev \ - libnl-genl-3-200 \ - libnl-genl-3-dev \ - libpopt-dev - -# Packages needed for net-snmp -RUN apt-get update && apt-get install -y \ - python-all \ - python2.7-dev \ - libmariadb-dev - -# Install packer -RUN export LATEST="$(curl -s https://checkpoint-api.hashicorp.com/v1/check/packer | \ - jq -r -M '.current_version')"; \ - echo "url https://releases.hashicorp.com/packer/"$LATEST"/packer_"$LATEST"_linux_arm.zip" |\ - curl -K- | gzip -d > /usr/bin/packer && \ - chmod +x /usr/bin/packer - -# -# live-build: building in docker fails with mounting /proc | /sys -# -# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=919659 -# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=921815 -# https://salsa.debian.org/installer-team/debootstrap/merge_requests/26 -# -RUN wget https://salsa.debian.org/klausenbusk-guest/debootstrap/commit/a9a603b17cadbf52cb98cde0843dc9f23a08b0da.patch && \ - git clone https://salsa.debian.org/installer-team/debootstrap && \ - cd debootstrap && \ - git checkout 1.0.114 && \ - patch -p1 < ../a9a603b17cadbf52cb98cde0843dc9f23a08b0da.patch && \ - dch -n "Applying fix for docker image compile" && \ - dpkg-buildpackage -us -uc && \ - sudo dpkg -i ../debootstrap*.deb - -# Allow password-less 'sudo' for all users in group 'sudo' -RUN sed "s/^%sudo.*/%sudo\tALL=(ALL) NOPASSWD:ALL/g" -i /etc/sudoers && \ - chmod a+s /usr/sbin/useradd /usr/sbin/groupadd /usr/sbin/gosu /usr/sbin/usermod - -# Ensure sure all users have access to our OCAM installation -RUN echo "$(opam env --root=/opt/opam --set-root)" >> /etc/skel/.bashrc - -# Cleanup -RUN rm -rf /tmp/* - -COPY entrypoint.sh /usr/local/bin/entrypoint.sh -ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] diff --git a/docker/arm64/Dockerfile b/docker/arm64/Dockerfile new file mode 100644 index 00000000..c770dd6a --- /dev/null +++ b/docker/arm64/Dockerfile @@ -0,0 +1,314 @@ +# Copyright (C) 2019 VyOS maintainers and contributors +# +# This program is free software; you can redistribute it and/or modify +# in order to easy exprort images built to "external" world +# it under the terms of the GNU General Public License version 2 or later as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Must be run with --privileged flag, recommended to run the container with a +# volume mapped in order to easy export images + +FROM multiarch/debian-debootstrap:arm64-buster-slim +LABEL authors="VyOS Maintainers " + +ENV DEBIAN_FRONTEND noninteractive + +# Standard shell should be bash not dash +RUN echo "dash dash/sh boolean false" | debconf-set-selections && \ + dpkg-reconfigure dash + +RUN apt-get update && apt-get install -y \ + dialog \ + apt-utils \ + locales + +RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen +ENV LANG en_US.utf8 + +RUN apt-get update && apt-get install -y \ + vim \ + git \ + curl \ + make \ + sudo \ + mc \ + pbuilder \ + devscripts \ + squashfs-tools \ + autoconf \ + automake \ + dpkg-dev \ + genisoimage \ + lsb-release \ + fakechroot \ + libtool \ + libapt-pkg-dev \ + parted \ + kpartx \ + quilt \ + python3-lxml \ + python3-setuptools \ + python3-nose \ + python3-coverage \ + python3-sphinx \ + python3-pystache \ + python3-git \ + python3-pip \ + pkg-config \ + debhelper \ + gosu \ + live-build \ + jq + +# Package needed for mdns-repeater +RUN apt-get update && apt-get install -y \ + dh-systemd + +# +# Building libvyosconf requires a full configured OPAM/OCaml setup +# +RUN apt-get update && apt-get install -y \ + libffi-dev \ + libpcre3-dev + +RUN curl https://raw.githubusercontent.com/ocaml/opam/2.0.2/shell/install.sh --output /tmp/opam_install.sh && \ + sed -i 's/read BINDIR/BINDIR=""/' /tmp/opam_install.sh && sh /tmp/opam_install.sh && \ + opam init --root=/opt/opam --comp=4.07.0 --disable-sandboxing + +RUN eval $(opam env --root=/opt/opam --set-root) && \ + opam install -y \ + oasis + +RUN eval $(opam env --root=/opt/opam --set-root) && opam install -y \ + fileutils \ + lwt \ + lwt_ppx \ + lwt_log \ + ocplib-endian \ + ounit \ + pcre \ + ppx_deriving_yojson \ + sha \ + toml \ + xml-light \ + batteries \ + ocaml-protoc \ + ctypes-foreign \ + menhir + +RUN eval $(opam env --root=/opt/opam --set-root) && opam install -y \ + ctypes + +# Build VyConf which is required to build libvyosconfig +RUN eval $(opam env --root=/opt/opam --set-root) && \ + opam pin add vyconf https://github.com/vyos/vyconf.git#51d79a3f -y + +# Build libvyosconfig +RUN eval $(opam env --root=/opt/opam --set-root) && \ + git clone https://github.com/vyos/libvyosconfig.git && \ + cd libvyosconfig && git checkout 9a80a5d3 && \ + dpkg-buildpackage -uc -us -tc -b && \ + dpkg -i ../libvyosconfig0_*_amd64.deb + +# Packages needed for vyatta-cfg +RUN apt-get update && apt-get install -y \ + libglib2.0-dev \ + libperl-dev \ + libboost-filesystem-dev + +# Packages needed for vyatta-iproute +RUN apt-get update && apt-get install -y \ + iptables-dev \ + libatm1-dev \ + libcap-dev \ + libdb-dev \ + libelf-dev \ + libselinux1-dev + +# Packages needed for vyatta-webgui +RUN apt-get update && apt-get install -y \ + libexpat1-dev \ + subversion + +# Packages needed for pmacct +RUN apt-get update && apt-get install -y \ + libpcap-dev \ + libpq-dev \ + default-libmysqlclient-dev \ + libgeoip-dev \ + librabbitmq-dev \ + libjansson-dev \ + librdkafka-dev \ + libnetfilter-log-dev + +# Pavkages needed for wireguard +RUN apt-get update && apt-get install -y \ + libmnl-dev + +# Packages needed for kernel +RUN apt-get update && apt-get install -y \ + libncurses5-dev \ + flex \ + bison \ + libelf-dev \ + bc \ + kmod + +# Packages needed for vyos-accel-ppp +RUN apt-get update && apt-get install -y \ + cdbs \ + cmake \ + liblua5.1-dev + +# Prerequisites for building rtrlib +# see http://docs.frrouting.org/projects/dev-guide/en/latest/building-frr-for-debian8.html +RUN apt-get update && apt-get install -y \ + graphviz \ + doxygen \ + libssh-dev \ + libssl-dev + +# Build rtrlib release 0.6.3 +RUN export RTRLIB_VERSION="0.6.3" && \ + wget -P /tmp https://github.com/rtrlib/rtrlib/archive/v${RTRLIB_VERSION}.tar.gz && \ + tar xf /tmp/v${RTRLIB_VERSION}.tar.gz -C /tmp && \ + cd /tmp/rtrlib-${RTRLIB_VERSION} && dpkg-buildpackage -uc -us -tc -b && \ + dpkg -i ../librtr*_amd64.deb ../librtr*_all.deb + +# Packages needed to build frr itself +# https://github.com/FRRouting/frr/blob/master/doc/developer/building-libyang.rst +# for more info +RUN apt-get update && apt-get install -y \ + libyang-dev \ + libyang0.16 \ + chrpath \ + install-info \ + libjson-c-dev \ + libpython3-dev \ + python3-dev \ + python3-pytest \ + texinfo + +# Packages needed for conntrack-tools +RUN apt-get update && apt-get install -y \ + libnetfilter-conntrack-dev \ + libnetfilter-cthelper0-dev \ + libnetfilter-cttimeout-dev \ + libnetfilter-queue-dev + +# Packages needed for hvinfo +RUN apt-get update && apt-get install -y \ + gnat \ + gprbuild + +# Packages needed for vyos-1x +RUN apt-get update && apt-get install -y \ + whois + +# Packages needed for vyos-xe-guest-utilities +RUN apt-get update && apt-get install -y \ + golang + +# Packages needed for ipaddrcheck +RUN apt-get update && apt-get install -y \ + libcidr0 \ + libcidr-dev \ + check + +# Packages needed for lldpd +RUN apt-get update && apt-get install -y \ + libbsd-dev \ + libevent-dev + +# Packages needed for vyatta-quagga +RUN apt-get update && apt-get install -y \ + libpam-dev \ + libcap-dev \ + libsnmp-dev \ + gawk + +# Packages needed for vyos-strongswan +RUN apt-get update && apt-get install -y \ + libkrb5-dev \ + libssl-dev \ + libxml2-dev \ + systemd \ + libcurl4-openssl-dev \ + libgcrypt20-dev \ + libgmp3-dev \ + libldap2-dev \ + libsqlite3-dev \ + dh-apparmor \ + gperf \ + libsystemd-dev \ + python3-stdeb \ + python-setuptools + +# Packages needed for vyos-opennhrp +RUN apt-get update && apt-get install -y \ + libc-ares-dev + +# Packages needed for ddclient +RUN apt-get update && apt-get install -y \ + xmlto + +# Packages needed for keepalived +RUN apt-get update && apt-get install -y \ + libnl-3-200 \ + libnl-3-dev \ + libnl-nf-3-200 \ + libnl-nf-3-dev \ + libipset-dev \ + libnl-genl-3-200 \ + libnl-genl-3-dev \ + libpopt-dev + +# Packages needed for net-snmp +RUN apt-get update && apt-get install -y \ + python-all \ + python2.7-dev \ + libmariadb-dev + +# Install packer +RUN export LATEST="$(curl -s https://checkpoint-api.hashicorp.com/v1/check/packer | \ + jq -r -M '.current_version')"; \ + echo "url https://releases.hashicorp.com/packer/"$LATEST"/packer_"$LATEST"_linux_arm64.zip" |\ + curl -K- | gzip -d > /usr/bin/packer && \ + chmod +x /usr/bin/packer + +# +# live-build: building in docker fails with mounting /proc | /sys +# +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=919659 +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=921815 +# https://salsa.debian.org/installer-team/debootstrap/merge_requests/26 +# +RUN wget https://salsa.debian.org/klausenbusk-guest/debootstrap/commit/a9a603b17cadbf52cb98cde0843dc9f23a08b0da.patch && \ + git clone https://salsa.debian.org/installer-team/debootstrap && \ + cd debootstrap && \ + git checkout 1.0.114 && \ + patch -p1 < ../a9a603b17cadbf52cb98cde0843dc9f23a08b0da.patch && \ + dch -n "Applying fix for docker image compile" && \ + dpkg-buildpackage -us -uc && \ + sudo dpkg -i ../debootstrap*.deb + +# Allow password-less 'sudo' for all users in group 'sudo' +RUN sed "s/^%sudo.*/%sudo\tALL=(ALL) NOPASSWD:ALL/g" -i /etc/sudoers && \ + chmod a+s /usr/sbin/useradd /usr/sbin/groupadd /usr/sbin/gosu /usr/sbin/usermod + +# Ensure sure all users have access to our OCAM installation +RUN echo "$(opam env --root=/opt/opam --set-root)" >> /etc/skel/.bashrc + +# Cleanup +RUN rm -rf /tmp/* + +COPY entrypoint.sh /usr/local/bin/entrypoint.sh +ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] diff --git a/docker/arm64/hooks/post_checkout b/docker/arm64/hooks/post_checkout new file mode 100644 index 00000000..fa25f63d --- /dev/null +++ b/docker/arm64/hooks/post_checkout @@ -0,0 +1,3 @@ +#!/bin/bash +# downloads a local copy of qemu on docker-hub build machines +curl -L https://github.com/balena-io/qemu/releases/download/v3.0.0%2Bresin/qemu-3.0.0+resin-arm.tar.gz | tar zxvf - -C . && mv qemu-3.0.0+resin-arm/qemu-arm-static . diff --git a/docker/arm64/hooks/pre_build b/docker/arm64/hooks/pre_build new file mode 100644 index 00000000..a08c740b --- /dev/null +++ b/docker/arm64/hooks/pre_build @@ -0,0 +1,4 @@ +#!/bin/bash +# Register qemu-*-static for all supported processors except the +# current one, but also remove all registered binfmt_misc before +docker run --rm --privileged multiarch/qemu-user-static:register --reset diff --git a/docker/armhf/Dockerfile b/docker/armhf/Dockerfile new file mode 100644 index 00000000..f07086e7 --- /dev/null +++ b/docker/armhf/Dockerfile @@ -0,0 +1,314 @@ +# Copyright (C) 2019 VyOS maintainers and contributors +# +# This program is free software; you can redistribute it and/or modify +# in order to easy exprort images built to "external" world +# it under the terms of the GNU General Public License version 2 or later as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Must be run with --privileged flag, recommended to run the container with a +# volume mapped in order to easy export images + +FROM multiarch/debian-debootstrap:armhf-buster-slim +LABEL authors="VyOS Maintainers " + +ENV DEBIAN_FRONTEND noninteractive + +# Standard shell should be bash not dash +RUN echo "dash dash/sh boolean false" | debconf-set-selections && \ + dpkg-reconfigure dash + +RUN apt-get update && apt-get install -y \ + dialog \ + apt-utils \ + locales + +RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen +ENV LANG en_US.utf8 + +RUN apt-get update && apt-get install -y \ + vim \ + git \ + curl \ + make \ + sudo \ + mc \ + pbuilder \ + devscripts \ + squashfs-tools \ + autoconf \ + automake \ + dpkg-dev \ + genisoimage \ + lsb-release \ + fakechroot \ + libtool \ + libapt-pkg-dev \ + parted \ + kpartx \ + quilt \ + python3-lxml \ + python3-setuptools \ + python3-nose \ + python3-coverage \ + python3-sphinx \ + python3-pystache \ + python3-git \ + python3-pip \ + pkg-config \ + debhelper \ + gosu \ + live-build \ + jq + +# Package needed for mdns-repeater +RUN apt-get update && apt-get install -y \ + dh-systemd + +# +# Building libvyosconf requires a full configured OPAM/OCaml setup +# +RUN apt-get update && apt-get install -y \ + libffi-dev \ + libpcre3-dev + +RUN curl https://raw.githubusercontent.com/ocaml/opam/2.0.2/shell/install.sh --output /tmp/opam_install.sh && \ + sed -i 's/read BINDIR/BINDIR=""/' /tmp/opam_install.sh && sh /tmp/opam_install.sh && \ + opam init --root=/opt/opam --comp=4.07.0 --disable-sandboxing + +RUN eval $(opam env --root=/opt/opam --set-root) && \ + opam install -y \ + oasis + +RUN eval $(opam env --root=/opt/opam --set-root) && opam install -y \ + fileutils \ + lwt \ + lwt_ppx \ + lwt_log \ + ocplib-endian \ + ounit \ + pcre \ + ppx_deriving_yojson \ + sha \ + toml \ + xml-light \ + batteries \ + ocaml-protoc \ + ctypes-foreign \ + menhir + +RUN eval $(opam env --root=/opt/opam --set-root) && opam install -y \ + ctypes + +# Build VyConf which is required to build libvyosconfig +RUN eval $(opam env --root=/opt/opam --set-root) && \ + opam pin add vyconf https://github.com/vyos/vyconf.git#51d79a3f -y + +# Build libvyosconfig +RUN eval $(opam env --root=/opt/opam --set-root) && \ + git clone https://github.com/vyos/libvyosconfig.git && \ + cd libvyosconfig && git checkout 9a80a5d3 && \ + dpkg-buildpackage -uc -us -tc -b && \ + dpkg -i ../libvyosconfig0_*_amd64.deb + +# Packages needed for vyatta-cfg +RUN apt-get update && apt-get install -y \ + libglib2.0-dev \ + libperl-dev \ + libboost-filesystem-dev + +# Packages needed for vyatta-iproute +RUN apt-get update && apt-get install -y \ + iptables-dev \ + libatm1-dev \ + libcap-dev \ + libdb-dev \ + libelf-dev \ + libselinux1-dev + +# Packages needed for vyatta-webgui +RUN apt-get update && apt-get install -y \ + libexpat1-dev \ + subversion + +# Packages needed for pmacct +RUN apt-get update && apt-get install -y \ + libpcap-dev \ + libpq-dev \ + default-libmysqlclient-dev \ + libgeoip-dev \ + librabbitmq-dev \ + libjansson-dev \ + librdkafka-dev \ + libnetfilter-log-dev + +# Pavkages needed for wireguard +RUN apt-get update && apt-get install -y \ + libmnl-dev + +# Packages needed for kernel +RUN apt-get update && apt-get install -y \ + libncurses5-dev \ + flex \ + bison \ + libelf-dev \ + bc \ + kmod + +# Packages needed for vyos-accel-ppp +RUN apt-get update && apt-get install -y \ + cdbs \ + cmake \ + liblua5.1-dev + +# Prerequisites for building rtrlib +# see http://docs.frrouting.org/projects/dev-guide/en/latest/building-frr-for-debian8.html +RUN apt-get update && apt-get install -y \ + graphviz \ + doxygen \ + libssh-dev \ + libssl-dev + +# Build rtrlib release 0.6.3 +RUN export RTRLIB_VERSION="0.6.3" && \ + wget -P /tmp https://github.com/rtrlib/rtrlib/archive/v${RTRLIB_VERSION}.tar.gz && \ + tar xf /tmp/v${RTRLIB_VERSION}.tar.gz -C /tmp && \ + cd /tmp/rtrlib-${RTRLIB_VERSION} && dpkg-buildpackage -uc -us -tc -b && \ + dpkg -i ../librtr*_amd64.deb ../librtr*_all.deb + +# Packages needed to build frr itself +# https://github.com/FRRouting/frr/blob/master/doc/developer/building-libyang.rst +# for more info +RUN apt-get update && apt-get install -y \ + libyang-dev \ + libyang0.16 \ + chrpath \ + install-info \ + libjson-c-dev \ + libpython3-dev \ + python3-dev \ + python3-pytest \ + texinfo + +# Packages needed for conntrack-tools +RUN apt-get update && apt-get install -y \ + libnetfilter-conntrack-dev \ + libnetfilter-cthelper0-dev \ + libnetfilter-cttimeout-dev \ + libnetfilter-queue-dev + +# Packages needed for hvinfo +RUN apt-get update && apt-get install -y \ + gnat \ + gprbuild + +# Packages needed for vyos-1x +RUN apt-get update && apt-get install -y \ + whois + +# Packages needed for vyos-xe-guest-utilities +RUN apt-get update && apt-get install -y \ + golang + +# Packages needed for ipaddrcheck +RUN apt-get update && apt-get install -y \ + libcidr0 \ + libcidr-dev \ + check + +# Packages needed for lldpd +RUN apt-get update && apt-get install -y \ + libbsd-dev \ + libevent-dev + +# Packages needed for vyatta-quagga +RUN apt-get update && apt-get install -y \ + libpam-dev \ + libcap-dev \ + libsnmp-dev \ + gawk + +# Packages needed for vyos-strongswan +RUN apt-get update && apt-get install -y \ + libkrb5-dev \ + libssl-dev \ + libxml2-dev \ + systemd \ + libcurl4-openssl-dev \ + libgcrypt20-dev \ + libgmp3-dev \ + libldap2-dev \ + libsqlite3-dev \ + dh-apparmor \ + gperf \ + libsystemd-dev \ + python3-stdeb \ + python-setuptools + +# Packages needed for vyos-opennhrp +RUN apt-get update && apt-get install -y \ + libc-ares-dev + +# Packages needed for ddclient +RUN apt-get update && apt-get install -y \ + xmlto + +# Packages needed for keepalived +RUN apt-get update && apt-get install -y \ + libnl-3-200 \ + libnl-3-dev \ + libnl-nf-3-200 \ + libnl-nf-3-dev \ + libipset-dev \ + libnl-genl-3-200 \ + libnl-genl-3-dev \ + libpopt-dev + +# Packages needed for net-snmp +RUN apt-get update && apt-get install -y \ + python-all \ + python2.7-dev \ + libmariadb-dev + +# Install packer +RUN export LATEST="$(curl -s https://checkpoint-api.hashicorp.com/v1/check/packer | \ + jq -r -M '.current_version')"; \ + echo "url https://releases.hashicorp.com/packer/"$LATEST"/packer_"$LATEST"_linux_arm.zip" |\ + curl -K- | gzip -d > /usr/bin/packer && \ + chmod +x /usr/bin/packer + +# +# live-build: building in docker fails with mounting /proc | /sys +# +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=919659 +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=921815 +# https://salsa.debian.org/installer-team/debootstrap/merge_requests/26 +# +RUN wget https://salsa.debian.org/klausenbusk-guest/debootstrap/commit/a9a603b17cadbf52cb98cde0843dc9f23a08b0da.patch && \ + git clone https://salsa.debian.org/installer-team/debootstrap && \ + cd debootstrap && \ + git checkout 1.0.114 && \ + patch -p1 < ../a9a603b17cadbf52cb98cde0843dc9f23a08b0da.patch && \ + dch -n "Applying fix for docker image compile" && \ + dpkg-buildpackage -us -uc && \ + sudo dpkg -i ../debootstrap*.deb + +# Allow password-less 'sudo' for all users in group 'sudo' +RUN sed "s/^%sudo.*/%sudo\tALL=(ALL) NOPASSWD:ALL/g" -i /etc/sudoers && \ + chmod a+s /usr/sbin/useradd /usr/sbin/groupadd /usr/sbin/gosu /usr/sbin/usermod + +# Ensure sure all users have access to our OCAM installation +RUN echo "$(opam env --root=/opt/opam --set-root)" >> /etc/skel/.bashrc + +# Cleanup +RUN rm -rf /tmp/* + +COPY entrypoint.sh /usr/local/bin/entrypoint.sh +ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] diff --git a/docker/armhf/hooks/post_checkout b/docker/armhf/hooks/post_checkout new file mode 100644 index 00000000..fa25f63d --- /dev/null +++ b/docker/armhf/hooks/post_checkout @@ -0,0 +1,3 @@ +#!/bin/bash +# downloads a local copy of qemu on docker-hub build machines +curl -L https://github.com/balena-io/qemu/releases/download/v3.0.0%2Bresin/qemu-3.0.0+resin-arm.tar.gz | tar zxvf - -C . && mv qemu-3.0.0+resin-arm/qemu-arm-static . diff --git a/docker/armhf/hooks/pre_build b/docker/armhf/hooks/pre_build new file mode 100644 index 00000000..a08c740b --- /dev/null +++ b/docker/armhf/hooks/pre_build @@ -0,0 +1,4 @@ +#!/bin/bash +# Register qemu-*-static for all supported processors except the +# current one, but also remove all registered binfmt_misc before +docker run --rm --privileged multiarch/qemu-user-static:register --reset -- cgit v1.2.3 From 672c6153a8c9893095d1595a366660d82d116862 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 19 Sep 2019 18:26:13 +0200 Subject: Docker: arm64/armhf remove amd64 references --- docker/arm64/Dockerfile | 4 ++-- docker/armhf/Dockerfile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'docker') diff --git a/docker/arm64/Dockerfile b/docker/arm64/Dockerfile index c770dd6a..b45a4f73 100644 --- a/docker/arm64/Dockerfile +++ b/docker/arm64/Dockerfile @@ -116,7 +116,7 @@ RUN eval $(opam env --root=/opt/opam --set-root) && \ git clone https://github.com/vyos/libvyosconfig.git && \ cd libvyosconfig && git checkout 9a80a5d3 && \ dpkg-buildpackage -uc -us -tc -b && \ - dpkg -i ../libvyosconfig0_*_amd64.deb + dpkg -i ../libvyosconfig0_*.deb # Packages needed for vyatta-cfg RUN apt-get update && apt-get install -y \ @@ -181,7 +181,7 @@ RUN export RTRLIB_VERSION="0.6.3" && \ wget -P /tmp https://github.com/rtrlib/rtrlib/archive/v${RTRLIB_VERSION}.tar.gz && \ tar xf /tmp/v${RTRLIB_VERSION}.tar.gz -C /tmp && \ cd /tmp/rtrlib-${RTRLIB_VERSION} && dpkg-buildpackage -uc -us -tc -b && \ - dpkg -i ../librtr*_amd64.deb ../librtr*_all.deb + dpkg -i ../librtr*.deb # Packages needed to build frr itself # https://github.com/FRRouting/frr/blob/master/doc/developer/building-libyang.rst diff --git a/docker/armhf/Dockerfile b/docker/armhf/Dockerfile index f07086e7..833c563c 100644 --- a/docker/armhf/Dockerfile +++ b/docker/armhf/Dockerfile @@ -116,7 +116,7 @@ RUN eval $(opam env --root=/opt/opam --set-root) && \ git clone https://github.com/vyos/libvyosconfig.git && \ cd libvyosconfig && git checkout 9a80a5d3 && \ dpkg-buildpackage -uc -us -tc -b && \ - dpkg -i ../libvyosconfig0_*_amd64.deb + dpkg -i ../libvyosconfig0_*.deb # Packages needed for vyatta-cfg RUN apt-get update && apt-get install -y \ @@ -181,7 +181,7 @@ RUN export RTRLIB_VERSION="0.6.3" && \ wget -P /tmp https://github.com/rtrlib/rtrlib/archive/v${RTRLIB_VERSION}.tar.gz && \ tar xf /tmp/v${RTRLIB_VERSION}.tar.gz -C /tmp && \ cd /tmp/rtrlib-${RTRLIB_VERSION} && dpkg-buildpackage -uc -us -tc -b && \ - dpkg -i ../librtr*_amd64.deb ../librtr*_all.deb + dpkg -i ../librtr*.deb # Packages needed to build frr itself # https://github.com/FRRouting/frr/blob/master/doc/developer/building-libyang.rst -- cgit v1.2.3 From 9964bbbb239519bdf0a153c1dcddf18cdb4c0fbe Mon Sep 17 00:00:00 2001 From: Kim Date: Fri, 20 Sep 2019 08:41:17 +0200 Subject: Ignore certificates in curl --- docker/armhf/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docker') diff --git a/docker/armhf/Dockerfile b/docker/armhf/Dockerfile index 833c563c..1ac51b61 100644 --- a/docker/armhf/Dockerfile +++ b/docker/armhf/Dockerfile @@ -79,7 +79,7 @@ RUN apt-get update && apt-get install -y \ libffi-dev \ libpcre3-dev -RUN curl https://raw.githubusercontent.com/ocaml/opam/2.0.2/shell/install.sh --output /tmp/opam_install.sh && \ +RUN curl -k https://raw.githubusercontent.com/ocaml/opam/2.0.2/shell/install.sh --output /tmp/opam_install.sh && \ sed -i 's/read BINDIR/BINDIR=""/' /tmp/opam_install.sh && sh /tmp/opam_install.sh && \ opam init --root=/opt/opam --comp=4.07.0 --disable-sandboxing @@ -278,10 +278,10 @@ RUN apt-get update && apt-get install -y \ libmariadb-dev # Install packer -RUN export LATEST="$(curl -s https://checkpoint-api.hashicorp.com/v1/check/packer | \ +RUN export LATEST="$(curl -k -s https://checkpoint-api.hashicorp.com/v1/check/packer | \ jq -r -M '.current_version')"; \ echo "url https://releases.hashicorp.com/packer/"$LATEST"/packer_"$LATEST"_linux_arm.zip" |\ - curl -K- | gzip -d > /usr/bin/packer && \ + curl -k -K- | gzip -d > /usr/bin/packer && \ chmod +x /usr/bin/packer # -- cgit v1.2.3 From 7e14af718d2356a7c0d69acfb1994b965660fb30 Mon Sep 17 00:00:00 2001 From: Runar Borge Date: Fri, 27 Sep 2019 21:49:30 +0200 Subject: Testsuite: Move needed packages to Dockerfile insted of in the Jenkins pipeline --- Jenkinsfile | 1 - docker/Dockerfile | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'docker') diff --git a/Jenkinsfile b/Jenkinsfile index 01887914..fcf0dafd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -120,7 +120,6 @@ pipeline { stage('Test') { steps { sh """ - sudo apt-get update && sudo apt-get install -y python3-pexpect qemu-kvm cd build/ sudo ../scripts/check-qemu-install --debug live-image-amd64.hybrid.iso """ diff --git a/docker/Dockerfile b/docker/Dockerfile index 1052a8e8..799b118d 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -280,6 +280,11 @@ RUN apt-get update && apt-get install -y \ python2.7-dev \ libmariadb-dev +# Packages needed for Qemu test-suite +RUN apt-get update && apt-get install -y \ + python3-pexpect \ + qemu-kvm + # Install packer RUN export LATEST="$(curl -s https://checkpoint-api.hashicorp.com/v1/check/packer | \ jq -r -M '.current_version')"; \ -- cgit v1.2.3 From 9e5435a6ce462c8d1a6327a3ae48987190e4cec4 Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Thu, 3 Oct 2019 10:43:27 -0500 Subject: T1710: [equuleus] buster: add patch to fix live-build missing key error --- docker/Dockerfile | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'docker') diff --git a/docker/Dockerfile b/docker/Dockerfile index 799b118d..d1da13b0 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -68,7 +68,8 @@ RUN apt-get update && apt-get install -y \ pkg-config \ debhelper \ gosu \ - live-build \ + po4a \ + cpio \ jq # Package needed for mdns-repeater @@ -292,6 +293,20 @@ RUN export LATEST="$(curl -s https://checkpoint-api.hashicorp.com/v1/check/packe curl -K- | gzip -d > /usr/bin/packer && \ chmod +x /usr/bin/packer +# +# live-build: building with local packages fails due to missing keys +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=941691 +# https://salsa.debian.org/live-team/live-build/merge_requests/30 +# +RUN wget https://salsa.debian.org/jestabro-guest/live-build/commit/63425b3e4f7ad3712ced4c9a3584ef9851c0355a.patch && \ + git clone https://salsa.debian.org/live-team/live-build.git && \ + cd live-build && \ + git checkout debian/1%20190311 && \ + patch -p1 < ../63425b3e4f7ad3712ced4c9a3584ef9851c0355a.patch && \ + dch -n "Applying fix for missing archive keys" && \ + dpkg-buildpackage -us -uc && \ + sudo dpkg -i ../live-build*.deb + # # live-build: building in docker fails with mounting /proc | /sys # -- cgit v1.2.3 From 529220d610a6cf327b5543a5fd06fc819cded88f Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Mon, 28 Oct 2019 13:44:47 -0500 Subject: T1773: update Dockerfile for changes to libvyosconfig (cherry-pick from current bdce9244ff9acc57bf04a6c922cc78787aaa8174) --- docker/Dockerfile | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) (limited to 'docker') diff --git a/docker/Dockerfile b/docker/Dockerfile index dfb4a35a..6a09ae43 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -85,40 +85,24 @@ RUN apt-get update && apt-get install -y \ RUN curl https://raw.githubusercontent.com/ocaml/opam/2.0.2/shell/install.sh --output /tmp/opam_install.sh && \ sed -i 's/read BINDIR/BINDIR=""/' /tmp/opam_install.sh && sh /tmp/opam_install.sh && \ - opam init --root=/opt/opam --comp=4.07.0 --disable-sandboxing - -RUN eval $(opam env --root=/opt/opam --set-root) && \ - opam install -y \ - oasis + opam init --root=/opt/opam --comp=4.08.0 --disable-sandboxing RUN eval $(opam env --root=/opt/opam --set-root) && opam install -y \ - fileutils \ - lwt \ - lwt_ppx \ - lwt_log \ - ocplib-endian \ - ounit \ - pcre \ - ppx_deriving_yojson \ - sha \ - toml \ - xml-light \ - batteries \ - ocaml-protoc \ - ctypes-foreign \ - menhir + pcre RUN eval $(opam env --root=/opt/opam --set-root) && opam install -y \ - ctypes + ctypes \ + ctypes-foreign \ + ctypes-build # Build VyConf which is required to build libvyosconfig RUN eval $(opam env --root=/opt/opam --set-root) && \ - opam pin add vyconf https://github.com/vyos/vyconf.git#51d79a3f -y + opam pin add vyos1x-config https://github.com/vyos/vyos1x-config.git#550048b3 -y # Build libvyosconfig RUN eval $(opam env --root=/opt/opam --set-root) && \ git clone https://github.com/vyos/libvyosconfig.git && \ - cd libvyosconfig && git checkout 9a80a5d3 && \ + cd libvyosconfig && git checkout 5138b5eb && \ dpkg-buildpackage -uc -us -tc -b && \ dpkg -i ../libvyosconfig0_*_amd64.deb -- cgit v1.2.3 From c3cbc7af476fb78d29e7cc9845749032a978c14f Mon Sep 17 00:00:00 2001 From: hagbard Date: Fri, 8 Nov 2019 10:08:11 -0800 Subject: vyos-qat: adding pkg dependency (cherry picked from commit 263c2379eebca8161f0ab70ed55d0503beb1e913) --- docker/Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'docker') diff --git a/docker/Dockerfile b/docker/Dockerfile index 6a09ae43..d4c9a627 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -157,6 +157,11 @@ RUN apt-get update && apt-get install -y \ cmake \ liblua5.2-dev +# Packages needed for vyos-qat +RUN apt-get update && apt-get install -y \ + libboost-dev \ + libudev-dev + # Prerequisites for building rtrlib # see http://docs.frrouting.org/projects/dev-guide/en/latest/building-frr-for-debian8.html RUN apt-get update && apt-get install -y \ -- cgit v1.2.3