From 1eecdb31bfe7c7d098fad96ebfc7719ae67ce570 Mon Sep 17 00:00:00 2001 From: Nikos <31227248+nikos-github@users.noreply.github.com> Date: Sat, 15 Dec 2018 11:52:36 -0800 Subject: [PATCH] [baseimage]: Install netifaces package in sonic-slave docker and sonic image (#1353) --- build_debian.sh | 9 ++++++++- sonic-slave/Dockerfile | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/build_debian.sh b/build_debian.sh index 2307ab0149..b4384113a1 100755 --- a/build_debian.sh +++ b/build_debian.sh @@ -337,6 +337,10 @@ sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT easy_install pip sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip install 'docker-py==1.6.0' ## Note: keep pip installed for maintainance purpose +## Get gcc and python dev pkgs +sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install gcc libpython2.7-dev +sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip install 'netifaces==0.10.7' + ## Create /var/run/redis folder for docker-database to mount sudo mkdir -p $FILESYSTEM_ROOT/var/run/redis @@ -379,11 +383,14 @@ if [ "${enable_organization_extensions}" = "y" ]; then fi fi +## Remove gcc and python dev pkgs +sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y remove gcc libpython2.7-dev + ## Update initramfs sudo chroot $FILESYSTEM_ROOT update-initramfs -u ## Clean up apt -sudo LANG=C chroot $FILESYSTEM_ROOT apt-get autoremove +sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y autoremove sudo LANG=C chroot $FILESYSTEM_ROOT apt-get autoclean sudo LANG=C chroot $FILESYSTEM_ROOT apt-get clean sudo LANG=C chroot $FILESYSTEM_ROOT bash -c 'rm -rf /usr/share/doc/* /usr/share/locale/* /var/lib/apt/lists/* /tmp/*' diff --git a/sonic-slave/Dockerfile b/sonic-slave/Dockerfile index 3fd4633d04..08a7c6bf05 100644 --- a/sonic-slave/Dockerfile +++ b/sonic-slave/Dockerfile @@ -278,7 +278,7 @@ RUN pip install --force-reinstall --upgrade jinja2>=2.10 RUN pip install j2cli # For sonic utilities testing -RUN pip install click-default-group click natsort tabulate +RUN pip install click-default-group click natsort tabulate netifaces==0.10.7 # For supervisor build RUN pip install meld3 mock