Run the second stage with bash.

This commit is contained in:
James Westby
2016-09-08 11:00:08 +01:00
parent e3cff8ae42
commit 2e2ab24571
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -1,7 +1,6 @@
#!/bin/bash
set -e
set -u
set -x
ROOT=$(cd $(dirname $0) && pwd)
@@ -70,7 +69,7 @@ rootfsDir=$(mktemp -d)
echo "Building base in $rootfsDir"
DEBOOTSTRAP_DIR=$DEBOOTSTRAP_DIR debootstrap --variant container --foreign ${DIST} "$rootfsDir"
(cd ${rootfsDir}/var/cache/apt/archives/ && find . -type f -print0 | xargs -0 sha256sum | sort -k2) | tee "$TARGET.manifest"
chroot "$rootfsDir" debootstrap/debootstrap --second-stage
chroot "$rootfsDir" bash debootstrap/debootstrap --second-stage
echo "Applying docker-specific tweaks"
# These are copied from the docker contrib/mkimage/debootstrap script.
+1 -1
View File
@@ -6,6 +6,6 @@ IMAGE_ID=$1
docker run --rm "$IMAGE_ID" dpkg -l apt
docker run --rm -e DEBIAN_FRONTEND=noninteractive "$IMAGE_ID" bash -c 'apt-get -q update && apt-get -q -y install less && less --help >/dev/null'
docker run --rm -e DEBIAN_FRONTEND=noninteractive "$IMAGE_ID" bash -c 'install_packages -q less && less --help >/dev/null && [ ! -e /var/cache/apt/archives ] && [ ! -e /var/lib/apt/lists ]'
docker run --rm -e DEBIAN_FRONTEND=noninteractive "$IMAGE_ID" bash -c 'install_packages less && less --help >/dev/null && [ ! -e /var/cache/apt/archives ] && [ ! -e /var/lib/apt/lists ]'
docker run --rm -e DEBIAN_FRONTEND=noninteractive "$IMAGE_ID" bash -c '[ ! -e /debootstrap ]'