mirror of
https://github.com/devilbox/docker-php-fpm.git
synced 2025-12-10 11:01:14 +00:00
38 lines
707 B
Bash
Executable File
38 lines
707 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
set -u
|
|
set -o pipefail
|
|
|
|
CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
|
|
|
|
IMAGE="${1}"
|
|
ARCH="${2}"
|
|
VERSION="${3}"
|
|
FLAVOUR="${4}"
|
|
|
|
# shellcheck disable=SC1090
|
|
. "${CWD}/../.lib.sh"
|
|
|
|
|
|
|
|
############################################################
|
|
# Tests
|
|
############################################################
|
|
|
|
###
|
|
### Ensuring 'apt update' works without any issues
|
|
###
|
|
print_h2 "Ensure 'apt update' works"
|
|
if ! name="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "${ARCH}" "-e DEBUG_ENTRYPOINT=2" )"; then
|
|
exit 1
|
|
fi
|
|
|
|
if ! docker_exec "${name}" "apt update"; then
|
|
docker_logs "${name}" || true
|
|
docker_stop "${name}" || true
|
|
echo "Failed"
|
|
exit 1
|
|
fi
|
|
docker_stop "${name}"
|