Skip to content

Commit 1eecdb3

Browse files
nikos-githublguohan
authored andcommitted
[baseimage]: Install netifaces package in sonic-slave docker and sonic image (#1353)
1 parent b506241 commit 1eecdb3

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

build_debian.sh

+8-1
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,10 @@ sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT easy_install pip
337337
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip install 'docker-py==1.6.0'
338338
## Note: keep pip installed for maintainance purpose
339339

340+
## Get gcc and python dev pkgs
341+
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install gcc libpython2.7-dev
342+
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip install 'netifaces==0.10.7'
343+
340344
## Create /var/run/redis folder for docker-database to mount
341345
sudo mkdir -p $FILESYSTEM_ROOT/var/run/redis
342346

@@ -379,11 +383,14 @@ if [ "${enable_organization_extensions}" = "y" ]; then
379383
fi
380384
fi
381385

386+
## Remove gcc and python dev pkgs
387+
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y remove gcc libpython2.7-dev
388+
382389
## Update initramfs
383390
sudo chroot $FILESYSTEM_ROOT update-initramfs -u
384391

385392
## Clean up apt
386-
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get autoremove
393+
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y autoremove
387394
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get autoclean
388395
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get clean
389396
sudo LANG=C chroot $FILESYSTEM_ROOT bash -c 'rm -rf /usr/share/doc/* /usr/share/locale/* /var/lib/apt/lists/* /tmp/*'

sonic-slave/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ RUN pip install --force-reinstall --upgrade jinja2>=2.10
278278
RUN pip install j2cli
279279

280280
# For sonic utilities testing
281-
RUN pip install click-default-group click natsort tabulate
281+
RUN pip install click-default-group click natsort tabulate netifaces==0.10.7
282282

283283
# For supervisor build
284284
RUN pip install meld3 mock

0 commit comments

Comments
 (0)