mirror of
https://github.com/bitnami/minideb.git
synced 2026-06-04 10:13:55 +08:00
47e1cb91ef
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.
15 lines
799 B
Bash
Executable File
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)'
|
|
|