Skip to content

Commit 79f2c47

Browse files
committed
Added PHP 7.4 images
1 parent 9c2aff2 commit 79f2c47

File tree

6 files changed

+3942
-23
lines changed

6 files changed

+3942
-23
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
REPOSITORY?=jsunier/php-symfony-test
22
BUILD_DATE="$(shell date -u +"%Y-%m-%dT%H:%m:%SZ")"
33
PRESTISSIMO_VERSION=0.3.9
4-
VERSIONS=7.3 7.2 7.1
5-
LATEST_VERSION=7.3
4+
VERSIONS=7.4 7.3 7.2 7.1
5+
LATEST_VERSION=7.4
66

77
build-mysql:
88
for VERSION in $(VERSIONS); do \

README.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
# jsunier/php-symfony-test
22

3-
Docker image to run PHPUnit with Symfony 3.x/4.x on PHP `7.1`/`7.2`/`7.3`.
3+
Docker image to run PHPUnit with Symfony 3.x/4.x on PHP `7.1`/`7.2`/`7.3`/`7.4`.
44

55
Docker container allowing you to build and test your PHP projects.
66

77
## Supported tags and respective `Dockerfile` links
88

9-
- `php7.3-mysql`, `php7.3-mariadb`, `latest`, `latest-mysql` ([php7.3/mysql/Dockerfile](https://github.com/jsunier/php-symfony-test/blob/master/php7.3/mysql/Dockerfile))
9+
- `php7.4-mysql`, `php7.4-mariadb`, `latest`, `latest-mysql` ([php7.4/mysql/Dockerfile](https://github.com/jsunier/php-symfony-test/blob/master/php7.4/mysql/Dockerfile))
10+
- `php7.3-mysql`, `php7.3-mariadb`, ([php7.3/mysql/Dockerfile](https://github.com/jsunier/php-symfony-test/blob/master/php7.3/mysql/Dockerfile))
1011
- `php7.2-mysql`, `php7.2-mariadb` ([php7.2/mysql/Dockerfile](https://github.com/jsunier/php-symfony-test/blob/master/php7.2/mysql/Dockerfile))
1112
- `php7.1-mysql`, `php7.1-mariadb` ([php7.1/mysql/Dockerfile](https://github.com/jsunier/php-symfony-test/blob/master/php7.1/mysql/Dockerfile))
12-
- `php7.3-postgresql`, `latest-postgresql` ([php7.3/postgresql/Dockerfile](https://github.com/jsunier/php-symfony-test/blob/master/php7.3/postgresql/Dockerfile))
13+
- `php7.4-postgresql`, `latest-postgresql` ([php7.3/postgresql/Dockerfile](https://github.com/jsunier/php-symfony-test/blob/master/php7.3/postgresql/Dockerfile))
14+
- `php7.3-postgresql` ([php7.3/postgresql/Dockerfile](https://github.com/jsunier/php-symfony-test/blob/master/php7.3/postgresql/Dockerfile))
1315
- `php7.2-postgresql` ([php7.2/postgresql/Dockerfile](https://github.com/jsunier/php-symfony-test/blob/master/php7.2/postgresql/Dockerfile))
1416
- `php7.1-postgresql` ([php7.1/postgresql/Dockerfile](https://github.com/jsunier/php-symfony-test/blob/master/php7.1/postgresql/Dockerfile))
1517

@@ -34,23 +36,23 @@ Composer is installed with [hirak/prestissimo](https://packagist.org/packages/hi
3436

3537
List of PHP extensions installed:
3638

37-
| Extension / PHP version | 7.1 | 7.2 | 7.3 |
38-
| ------------------------------------------------------- | :---: | :---: | :---: |
39-
| `mbstring` | | | |
40-
| `zip` | | | |
41-
| `iconv` | | | |
42-
| `opcache` | | | |
43-
| `bcmath` | | | |
44-
| `pdo_mysql` (mysql/mariadb) / `pdo_pgsql` (postgresql) | | | |
45-
| `pdo` | | | |
46-
| `imagick` | | | |
47-
| `sockets` | | | |
48-
| `xdebug` (2.6.1 for PHP 7.1 and 7.2 / 2.7.1 for PHP 7.3)| | | |
49-
| `gd` | | | |
50-
| `soap` | | | |
51-
| `mcrypt` | | | |
52-
| `oci8` | | | |
53-
| `redis` | | | |
39+
| Extension / PHP version | 7.1 | 7.2 | 7.3 | 7.4 |
40+
|------------------------------------------------------------------------------|-----|-----|-----|-----|
41+
| `mbstring` || | ||
42+
| `zip` || | ||
43+
| `iconv` || | ||
44+
| `opcache` || | ||
45+
| `bcmath` || | ||
46+
| `pdo_mysql` (mysql/mariadb) / `pdo_pgsql` (postgresql) || | ||
47+
| `pdo` || | ||
48+
| `imagick` || | ||
49+
| `sockets` || | ||
50+
| `xdebug` (2.6.1 for PHP 7.1 and 7.2 / 2.7.1 for PHP 7.3 / 2.9.0 for PHP 7.4) | | | ||
51+
| `gd` || | ||
52+
| `soap` || | ||
53+
| `mcrypt` || | ||
54+
| `oci8` || | ||
55+
| `redis` || | ||
5456

5557
# Default configurations
5658

@@ -102,6 +104,6 @@ To build these images, just go into the folder of you choice and run `docker bui
102104

103105
Example:
104106
```
105-
# cd php7.1/mysql
107+
# cd php7.4/mysql
106108
# docker build . -t my-awesome-phpunit-image
107109
```

php7.4/mysql/Dockerfile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
FROM php:7.4-cli
2+
3+
ARG BUILD_DATE
4+
ARG PRESTISSIMO_VERSION
5+
6+
LABEL maintainer="Joël Sunier <[email protected]>" \
7+
php.version="7.4" \
8+
php.pdo_connector="MySQL" \
9+
org.label-schema.build-date=${BUILD_DATE}
10+
11+
RUN apt-get update && apt-get install -yqq git curl libmcrypt-dev libjpeg-dev libpng-dev libfreetype6-dev libbz2-dev libxml2-dev libmagickwand-dev libpq-dev libzip-dev unzip && \
12+
docker-php-ext-install pdo pdo_mysql zip iconv opcache bcmath sockets soap && \
13+
docker-php-ext-configure gd --with-freetype --with-jpeg && \
14+
docker-php-ext-install gd && \
15+
pecl install imagick xdebug-2.9.0 && \
16+
docker-php-ext-enable imagick xdebug && \
17+
apt-get clean
18+
19+
COPY php.ini $PHP_INI_DIR/php.ini
20+
21+
RUN curl --silent --show-error https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
22+
23+
WORKDIR /app
24+
25+
# Create a "symfony" user
26+
RUN groupadd --gid 1000 symfony \
27+
&& useradd --uid 1000 --gid symfony --shell /bin/bash --create-home symfony
28+
29+
# Fix permissions issues
30+
RUN chmod -R a+wrx /app
31+
RUN chmod a+wrx /usr/local/bin/composer
32+
33+
VOLUME [ "/app" ]
34+
35+
USER symfony
36+
RUN composer global require --no-interaction --no-progress hirak/prestissimo:0.3.9
37+
38+
CMD [ "/app/bin/console" ]

0 commit comments

Comments
 (0)