Ensure apt update works on final images

This commit is contained in:
cytopia
2022-01-24 16:00:26 +01:00
parent feb6f0fee8
commit 61ee6b3bfb
12 changed files with 52 additions and 1 deletions

View File

@@ -0,0 +1,33 @@
#!/usr/bin/env bash
set -e
set -u
set -o pipefail
CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
IMAGE="${1}"
VERSION="${2}"
FLAVOUR="${3}"
# shellcheck disable=SC1090
. "${CWD}/../.lib.sh"
############################################################
# Tests
############################################################
###
### Ensuring 'apt update' works without any issues
###
did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2" )"
if ! docker_exec "${did}" "apt update"; then
docker_logs "${did}" || true
docker_stop "${did}" || true
echo "Failed"
exit 1
fi
docker_stop "${did}"