From 7b1b408888fe5ddb3e815e606eec15809f50e38f Mon Sep 17 00:00:00 2001 From: sarthurdev <965089+sarthurdev@users.noreply.github.com> Date: Thu, 23 Feb 2023 00:50:00 +0100 Subject: docker: T5003: Use Debian package for yq, fix pip installs, fix open-vmdk build * Add zlib1g-dev package for open-vmdk build Debian have updated python3-pip to prevent system-wide installs (PEP 668) * Adds and uses `pipx` that will install dependencies within a venv where appropriate * Use `--break-system-packages` argument for j2lint --- docker/Dockerfile | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'docker') diff --git a/docker/Dockerfile b/docker/Dockerfile index c9f0566b..69b7c20a 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -85,16 +85,15 @@ RUN apt-get update && apt-get install -y \ squashfs-tools \ genisoimage \ fakechroot \ + pipx \ python3-git \ python3-pip \ python3-flake8 \ python3-autopep8 \ + yq \ debootstrap \ live-build -# vyos-build now also makes use of TOML - install yq which has toml support -RUN pip install yq==3.1.0 - # Syslinux and Grub2 is only supported on x86 and x64 systems RUN if dpkg-architecture -ii386 || dpkg-architecture -iamd64; then \ apt-get update && apt-get install -y \ @@ -156,6 +155,10 @@ RUN eval $(opam env --root=/opt/opam --set-root) && \ dpkg-buildpackage -uc -us -tc -b && \ dpkg -i /tmp/libvyosconfig0_*_$(dpkg-architecture -qDEB_HOST_ARCH).deb +# Packages needed for open-vmdk +RUN apt-get update && apt-get install -y \ + zlib1g-dev + # Install open-vmdk RUN wget -O /tmp/open-vmdk-master.zip https://github.com/vmware/open-vmdk/archive/master.zip && \ unzip -d /tmp/ /tmp/open-vmdk-master.zip && \ @@ -242,19 +245,17 @@ RUN export RTRLIB_VERSION="0.8.0" export ARCH=$(dpkg-architecture -qDEB_HOST_ARC dpkg -i ../librtr0*_${ARCH}.deb ../librtr-dev*_${ARCH}.deb ../rtr-tools*_${ARCH}.deb # Packages needed to build libyang2 -RUN pip install apkg RUN apt-get update && apt-get install -y \ graphviz \ cmake \ - libpcre3-dev \ - python3-pip + libpcre3-dev # Prerequisites for building FRR from source # see http://docs.frrouting.org/projects/dev-guide/en/latest/building-frr-for-debian8.html # RUN export LIBYANG_COMMIT="v2.0.164" && \ git clone https://github.com/CESNET/libyang.git && \ - cd libyang && git checkout $LIBYANG_COMMIT && apkg build -i && \ + cd libyang && git checkout $LIBYANG_COMMIT && pipx run apkg build -i && \ cd pkg/pkgs/debian-*/libyang2_* && dpkg -i *.deb # Packages needed to build FRR itself @@ -293,7 +294,7 @@ RUN apt-get update && apt-get install -y \ gprbuild # Packages needed for vyos-1x -RUN pip install git+https://github.com/aristanetworks/j2lint.git@341b5d5db86 +RUN pip install --break-system-packages git+https://github.com/aristanetworks/j2lint.git@341b5d5db86 RUN apt-get update && apt-get install -y \ dh-python \ fakeroot \ -- cgit v1.2.3