From 80e3497c2f8af5ea47e5a798cd5356dcba6bbd21 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Mon, 21 Sep 2020 15:38:20 +0200 Subject: [PATCH] Let's be sure that this script is executed in a correct Docker image Test: xdebug --- install-php-extensions | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/install-php-extensions b/install-php-extensions index 4af0594..f6c0f19 100755 --- a/install-php-extensions +++ b/install-php-extensions @@ -12,6 +12,11 @@ set -o errexit set -o nounset +if ! which docker-php-ext-configure >/dev/null || ! which docker-php-ext-enable >/dev/null || ! which docker-php-ext-install >/dev/null || ! which docker-php-source >/dev/null; then + printf 'The script %s is meant to be used with official Docker PHP Images - https://hub.docker.com/_/php\n' "$0" >&2 + exit 1 +fi + # Reset the Internal Field Separator resetIFS() { IFS='