mirror of
https://github.com/bitnami/minideb.git
synced 2026-06-04 10:13:55 +08:00
Run the second stage with bash.
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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 ]'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user