From 8e99c9e8ddc168f3dea30cf2ca9a4d893cac3762 Mon Sep 17 00:00:00 2001 From: Romain Bastide Date: Wed, 18 Dec 2024 13:14:37 +0100 Subject: [PATCH] Update README.md Signed-off-by: MadCat34 --- README.md | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3ba9cbb..949310e 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,7 @@ $ composer static-analysis ## Using docker-compose -This skeleton provides a `docker-compose.yml` for use with [docker-compose](https://docs.docker.com/compose/); +This skeleton provides a `docker-compose.yml` and a `docker-compose.override.yml` for use with [docker-compose](https://docs.docker.com/compose/); it uses the provided `Dockerfile` to build a docker image for the `laminas` container created with `docker-compose`. Build and start the image and container using: @@ -131,18 +131,32 @@ $ docker-compose run laminas composer install Some composer packages optionally use additional PHP extensions. The Dockerfile contains several commented-out commands which enable some of the more popular php extensions. -For example, to install `pdo-pgsql` support for `laminas/laminas-db` uncomment the lines: +For example, to install `pdo-pgsql` support for `laminas/laminas-db` uncomment the lines `pdo-pgsql` : ```sh -# RUN apt-get install --yes libpq-dev \ -# && docker-php-ext-install pdo_pgsql +RUN set -eux; \ + install-php-extensions \ + apcu \ + intl \ + opcache \ + zip \ + ## Add here all extensions you need + # memcached \ + # mongodb \ + # redis \ + # mbstring \ + pdo_mysql \ + # pdo_pgsql \ + ; ``` then re-run the `docker-compose up -d --build` line as above. -> You may also want to combine the various `apt-get` and `docker-php-ext-*` +> You may also want to combine the various `apt-get` and `install-php-extensions` > statements later to reduce the number of layers created by your image. +> [install-php-extensions](https://github.com/mlocati/docker-php-extension-installer) is a script which easily installs PHP extensions in Docker containers. + ## Web server setup ### Apache setup