diff --git a/README.md b/README.md
index ba1ae07..df41cc8 100644
--- a/README.md
+++ b/README.md
@@ -28,13 +28,13 @@ Have a look at the following table to see all supported environment variables fo
NEW_UID |
int |
1000 |
- Assign the PHP-FPM user a new uid in order to syncronize file system permissions with your host computer and the Docker container. You should use a value that matches your host systems local user. (Type id for your uid). |
+ Assign the PHP-FPM user a new uid in order to syncronize file system permissions with your host computer and the Docker container. You should use a value that matches your host systems local user. (Type id -u for your uid). |
NEW_GID |
int |
1000 |
- Assign the PHP-FPM group a new gid in order to syncronize file system permissions with your host computer and the Docker container. You should use a value that matches your host systems local group. (Type id for your gid). |
+ Assign the PHP-FPM group a new gid in order to syncronize file system permissions with your host computer and the Docker container. You should use a value that matches your host systems local group. (Type id -g for your gid). |
|
diff --git a/tests/base/04-test-run_nginx.sh b/tests/base/04-test-run_nginx.sh
index f9df263..5e678e1 100755
--- a/tests/base/04-test-run_nginx.sh
+++ b/tests/base/04-test-run_nginx.sh
@@ -43,7 +43,7 @@ chmod 0644 "${DOC_ROOT_HOST}/index.php"
run "docker pull ${CONTAINER}"
# Start PHP-FPM
-did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -v ${DOC_ROOT_HOST}:${DOC_ROOT_CONT}" )"
+did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -v ${DOC_ROOT_HOST}:${DOC_ROOT_CONT}" )"
name="$( docker_name "${did}" )"
# Nginx.conf
diff --git a/tests/prod/05-test-mount-custom_ini.sh b/tests/prod/05-test-mount-custom_ini.sh
index d514ed3..18e8e7b 100755
--- a/tests/prod/05-test-mount-custom_ini.sh
+++ b/tests/prod/05-test-mount-custom_ini.sh
@@ -37,11 +37,17 @@ CONTAINER="nginx:stable"
echo "post_max_size = 17M" > "${PHP_INI_HOST}/post.ini"
echo " "${DOC_ROOT_HOST}/index.php"
+# Fix mount permissions
+chmod 0777 "${CONFIG_HOST}"
+chmod 0777 "${PHP_INI_HOST}"
+chmod 0777 "${DOC_ROOT_HOST}"
+chmod 0644 "${DOC_ROOT_HOST}/index.php"
+
# Pull container
run "docker pull ${CONTAINER}"
# Start PHP-FPM
-did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -v ${DOC_ROOT_HOST}:${DOC_ROOT_CONT} -v ${PHP_INI_HOST}:${PHP_INI_CONT}" )"
+did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -v ${DOC_ROOT_HOST}:${DOC_ROOT_CONT} -v ${PHP_INI_HOST}:${PHP_INI_CONT}" )"
name="$( docker_name "${did}" )"
# Nginx.conf
@@ -82,9 +88,29 @@ if ! run "docker logs ${did} | grep 'post.ini'"; then
fi
# Check PHP connectivity
-if ! run "curl -q -4 127.0.0.1:${WWW_PORT}/index.php >/dev/null 2>&1"; then
+if ! run "curl -q -4 http://127.0.0.1:${WWW_PORT}/index.php >/dev/null 2>&1"; then
+ # Info
+ run "netstat -tuln"
+ run "curl -4 http://127.0.0.1:${WWW_PORT}/index.php" || true
+ run "curl -6 http://127.0.0.1:${WWW_PORT}/index.php" || true
+ run "docker ps --no-trunc"
+ docker_exec "${ndid}" "nginx -t"
+
+ # Show logs
docker_logs "${ndid}" || true
docker_logs "${did}" || true
+
+ # Ensure file is available
+ docker_exec "${ndid}" "ls -la ${DOC_ROOT_CONT}/"
+ docker_exec "${did}" "ls -la ${DOC_ROOT_CONT}/"
+
+ docker_exec "${ndid}" "cat ${DOC_ROOT_CONT}/index.php"
+ docker_exec "${did}" "cat ${DOC_ROOT_CONT}/index.php"
+
+ # Nginx configuration
+ docker_exec "${ndid}" "cat ${CONFIG_CONT}/php.conf"
+
+ # Shutdown
docker_stop "${ndid}" || true
docker_stop "${did}" || true
rm -rf "${DOC_ROOT_HOST}"
@@ -96,9 +122,14 @@ fi
# Check modified php.ini
if ! docker_exec "${did}" "php -r \"echo ini_get('post_max_size');\" | grep '17M'"; then
+ # Info
docker_exec "${did}" "php -r \"echo ini_get('post_max_size');\""
+
+ # Show logs
docker_logs "${ndid}" || true
docker_logs "${did}" || true
+
+ # Shutdown
docker_stop "${ndid}" || true
docker_stop "${did}" || true
rm -rf "${DOC_ROOT_HOST}"
@@ -109,10 +140,29 @@ if ! docker_exec "${did}" "php -r \"echo ini_get('post_max_size');\" | grep '17M
fi
# Check modified php.ini
-if ! run "curl -q -4 127.0.0.1:${WWW_PORT}/index.php 2>/dev/null | grep post_max_size | grep '17M'"; then
- docker_exec "${did}" "php -r \"echo ini_get('post_max_size');\""
+if ! run "curl -q -4 http://127.0.0.1:${WWW_PORT}/index.php 2>/dev/null | grep post_max_size | grep '17M'"; then
+ # Info
+ run "netstat -tuln"
+ run "curl -4 http://127.0.0.1:${WWW_PORT}/index.php" || true
+ run "curl -6 http://127.0.0.1:${WWW_PORT}/index.php" || true
+ run "docker ps --no-trunc"
+ docker_exec "${ndid}" "nginx -t"
+
+ # Show logs
docker_logs "${ndid}" || true
docker_logs "${did}" || true
+
+ # Ensure file is available
+ docker_exec "${ndid}" "ls -la ${DOC_ROOT_CONT}/"
+ docker_exec "${did}" "ls -la ${DOC_ROOT_CONT}/"
+
+ docker_exec "${ndid}" "cat ${DOC_ROOT_CONT}/index.php"
+ docker_exec "${did}" "cat ${DOC_ROOT_CONT}/index.php"
+
+ # Nginx configuration
+ docker_exec "${ndid}" "cat ${CONFIG_CONT}/php.conf"
+
+ # Shutdown
docker_stop "${ndid}" || true
docker_stop "${did}" || true
rm -rf "${DOC_ROOT_HOST}"