Skip to content

Commit 975d320

Browse files
committed
Merge branch 'v4' of github.com:thecodingmachine/docker-images-php into v4
2 parents cab4ba1 + b6915dc commit 975d320

File tree

6 files changed

+21
-4
lines changed

6 files changed

+21
-4
lines changed

build-and-test.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ docker run --rm test/slim_onbuild php -m | grep pdo_pgsql
1919
docker run --rm test/slim_onbuild php -m | grep pdo_sqlite
2020
docker rmi test/slim_onbuild
2121

22+
# Let's check that the extensions are available for composer using "ARG PHP_EXTENSIONS" statement:
23+
docker build -t test/slim_onbuild_composer --build-arg PHP_VERSION="${PHP_VERSION}" --build-arg BRANCH="$BRANCH" --build-arg BRANCH_VARIANT="$BRANCH_VARIANT" tests/slim_onbuild_composer
24+
docker rmi test/slim_onbuild_composer
25+
2226
# Post build unit tests
2327
if [[ $VARIANT == cli* ]]; then CONTAINER_CWD=/usr/src/app; else CONTAINER_CWD=/var/www/html; fi
2428
# Default user is 1000
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
ARG BRANCH
2+
ARG BRANCH_VARIANT
3+
ARG PHP_VERSION
4+
5+
ARG PHP_EXTENSIONS="gd"
6+
FROM thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT}
7+
8+
COPY composer.json composer.json
9+
10+
# Let's check that GD is available.
11+
RUN composer install
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"require": {
3+
"ext-gd": "*"
4+
}
5+
}

utils/check_php_env_var_changes.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22

33
$phpEnvVarCache = include '/opt/php_env_var_cache.php';
4-
54
$envVars = getenv();
65
$shouldGenerateConfig = false;
76
$phpEnvVar = [];

utils/install_selected_extensions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ mv /etc/apt/apt.conf.d/docker-clean /tmp/docker-clean
88

99
apt-get update
1010

11-
php /usr/local/bin/install_selected_extensions.php
11+
/usr/bin/real_php /usr/local/bin/install_selected_extensions.php
1212

1313
# Let's enable autoclean again
1414
mv /tmp/docker-clean /etc/apt/apt.conf.d/docker-clean

utils/php_proxy.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/bin/bash
22

3-
#set -e
4-
53
sudo chown docker:docker /opt/php_env_var_cache.php
64

75
REGENERATE=$(/usr/bin/real_php /usr/local/bin/check_php_env_var_changes.php)

0 commit comments

Comments
 (0)