Skip to content

Commit

Permalink
Keep pip in the debian image (#356)
Browse files Browse the repository at this point in the history
  • Loading branch information
qiluo-msft authored Mar 3, 2017
1 parent f06dc5d commit d3891a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install \
## Note: gdisk is needed for sgdisk in install.sh
## Note: parted is needed for partprobe in install.sh
## Note: ca-certificates is needed for easy_install
## Note: don't install python-apt by pip, older than Debian repo one
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install \
file \
ifupdown \
Expand Down Expand Up @@ -232,8 +233,7 @@ set /files/etc/sysctl.conf/net.ipv6.conf.all.accept_dad 0
## docker-py is needed by Ansible docker module
sudo LANG=C chroot $FILESYSTEM_ROOT easy_install pip
sudo LANG=C chroot $FILESYSTEM_ROOT pip install 'docker-py==1.6.0'
## Remove pip which is unnecessary in the base image
sudo LANG=C chroot $FILESYSTEM_ROOT pip uninstall -y pip
## Note: keep pip installed for maintainance purpose

## Config DHCP for eth0
sudo tee -a $FILESYSTEM_ROOT/etc/network/interfaces > /dev/null <<EOF
Expand Down
1 change: 1 addition & 0 deletions files/build_templates/sonic_debian_extension.j2
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ sudo mkdir -p $FILESYSTEM_ROOT/etc/sonic/
sudo mkdir -p $FILESYSTEM_ROOT/usr/share/sonic/templates/

# Install dependencies for SONiC config engine
# TODO: pip-install instead of apt-get after config engine wrapped into a wheel, even better use pip implicitly installing dependencies
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install \
python-lxml \
python-jinja2 \
Expand Down

0 comments on commit d3891a2

Please sign in to comment.