|
1 | 1 | # Unic Drupal PHP Base |
2 | 2 |
|
3 | | -Drupal PHP base image with some useful additions. |
| 3 | +A PHP-FPM base image tailored for running [Drupal](https://www.drupal.org/) projects. It bundles the PHP extensions, image optimization tools, and utilities that Drupal projects commonly require. |
4 | 4 |
|
5 | 5 | ## Versions |
6 | 6 |
|
7 | 7 | | PHP | Branch | Notes | |
8 | 8 | |---|---|---| |
9 | 9 | | 7.4 | main | _EOL_ | |
10 | | -| 8.1 | release/8.1 | | |
11 | | -| 8.2 | | tbd | |
| 10 | +| 8.1 | release/8.1 | _EOL_ | |
| 11 | +| 8.2 | — | not available | |
| 12 | +| 8.3 | release/8.3 | | |
| 13 | +| 8.4 | release/8.4 | current | |
| 14 | + |
| 15 | +## Included Software |
| 16 | + |
| 17 | +### PHP Extensions |
| 18 | + |
| 19 | +| Extension | Notes | |
| 20 | +|---|---| |
| 21 | +| gd | Image processing with FreeType, JPEG, and WebP support | |
| 22 | +| opcache | Bytecode caching for improved performance | |
| 23 | +| pdo_mysql | MySQL / MariaDB database driver | |
| 24 | +| pdo_pgsql | PostgreSQL database driver | |
| 25 | +| zip | ZIP archive support | |
| 26 | +| bcmath | Arbitrary precision mathematics | |
| 27 | +| redis | Redis client via PECL | |
| 28 | +| apcu | In-memory key-value cache via PECL | |
| 29 | + |
| 30 | +### Tools |
| 31 | + |
| 32 | +| Tool | Purpose | |
| 33 | +|---|---| |
| 34 | +| Composer | PHP dependency manager | |
| 35 | +| Drush Launcher | Runs the project-local Drush version | |
| 36 | +| git | Version control | |
| 37 | +| rsync | File synchronization | |
| 38 | +| mariadb-client | Database CLI tools | |
| 39 | +| imagemagick | Image conversion and manipulation | |
| 40 | +| graphicsmagick | Image conversion and manipulation | |
| 41 | +| gifsicle | GIF optimization | |
| 42 | +| jpegoptim | JPEG optimization | |
| 43 | +| optipng | PNG optimization | |
| 44 | +| pngquant | PNG lossy compression | |
| 45 | +| pngcrush | PNG lossless compression | |
| 46 | + |
| 47 | +### PHP Configuration |
| 48 | + |
| 49 | +The following defaults are applied on top of the standard PHP-FPM configuration: |
| 50 | + |
| 51 | +| Setting | Value | |
| 52 | +|---|---| |
| 53 | +| `upload_max_filesize` | 20M | |
| 54 | +| `post_max_size` | 20M | |
| 55 | +| `memory_limit` | 256M | |
| 56 | +| `opcache.memory_consumption` | 128 | |
| 57 | +| `opcache.interned_strings_buffer` | 8 | |
| 58 | +| `opcache.max_accelerated_files` | 4000 | |
| 59 | +| `opcache.revalidate_freq` | 60 | |
| 60 | + |
| 61 | +## Usage |
| 62 | + |
| 63 | +Pull the image from Docker Hub: |
| 64 | + |
| 65 | +```bash |
| 66 | +docker pull unicdocker/drupal-php:release-8.4 |
| 67 | +``` |
| 68 | + |
| 69 | +Or use it as a base image in your own `Dockerfile`: |
| 70 | + |
| 71 | +```dockerfile |
| 72 | +FROM unicdocker/drupal-php:release-8.4 |
| 73 | +``` |
| 74 | + |
| 75 | +The `latest` tag always points to the most recent build from the `main` branch. |
12 | 76 |
|
13 | 77 | ## Build |
| 78 | + |
14 | 79 | ### Local |
15 | 80 |
|
16 | | -You can use your local Docker daemon to build the image. There are no depencencies: |
| 81 | +Build the image locally using your Docker daemon. No additional dependencies are required: |
17 | 82 |
|
18 | 83 | ```bash |
19 | 84 | docker build -t unicdocker/drupal-php:latest . |
20 | 85 | ``` |
| 86 | + |
| 87 | +### CI/CD |
| 88 | + |
| 89 | +Images are built and published to [Docker Hub](https://hub.docker.com/r/unicdocker/drupal-php) automatically via GitHub Actions whenever changes are pushed to `main` or any `release/**` branch, or when a version tag (`v*.*.*`) is created. |
0 commit comments