Skip to content

Commit

Permalink
[baseimage]: Install netifaces package in sonic-slave docker and soni…
Browse files Browse the repository at this point in the history
…c image (#1353)
  • Loading branch information
nikos-github authored and lguohan committed Dec 15, 2018
1 parent b506241 commit 1eecdb3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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/*'
Expand Down
2 changes: 1 addition & 1 deletion sonic-slave/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1eecdb3

Please sign in to comment.