export a proper debian PATH for the chroot

when running in the chroot, it would be expected to have a Debian-ish environment,
most important the PATH variable. Otherwise the host PATH would be used which can wrong
for Debian, especially if the host is Arch (which doesn't have /bin, /sbin or /usr/sbin).

Signed-off-by: Damjan Georgievski <gdamjan@gmail.com>
Upstream-commit: a8713271355c68023ea090eb223682e784c64f93
Component: engine
This commit is contained in:
Damjan Georgievski
2015-02-27 23:56:42 -07:00
committed by Tianon Gravi
parent 874029c008
commit 9654cdc98a
@@ -189,6 +189,7 @@ fi
(
set -x
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# make sure we're fully up-to-date
chroot "$rootfsDir" bash -c 'apt-get update && apt-get dist-upgrade -y'