Files
minideb/test
T
James Westby 47e1cb91ef Add some more commonly expected packages.
sysv-rc and util-linux are used in the postinst scripts
of some packages, and so those packages won't install
if they aren't available.

sysv-rc contains update-rc.d, so any package that installs
a service would fail to install. Those packages are common
to install in to containers.

util-linux contains the getopt command which some scripts
expect to find.
2016-10-19 12:22:47 +01:00

15 lines
799 B
Bash
Executable File

#!/bin/bash
set -eu
IMAGE_ID=$1
docker run --rm "$IMAGE_ID" dpkg -l apt
docker run --rm -e DEBIAN_FRONTEND=noninteractive "$IMAGE_ID" bash -c 'apt-get update && apt-get -y install less && less --help >/dev/null'
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 ]'
# Ask apt to install all packages that are already installed, has the effect of checking the
# dependencies are correctly available
docker run --rm -e DEBIAN_FRONTEND=noninteractive "$IMAGE_ID" bash -c 'apt-get update && (dpkg-query -W -f \${Package} | while read pkg; do apt-get install $pkg; done)'