📝 How to extend image with composer & fix #40

This commit is contained in:
mathieu.brunot 2019-06-01 20:24:07 +02:00
parent 0a06b301cf
commit f07c751c23
No known key found for this signature in database
GPG Key ID: 81584BEAF692D7E0

View File

@ -81,3 +81,35 @@ Build it from this directory with
```
docker build -t roundcubemail .
```
You can also create your own Docker image by extending from this image.
For instance, you could extend this image to add composer and install requirements for builtin plugins or even external plugins:
```Dockerfile
FROM roundcube/roundcubemail:latest
RUN set -ex; \
apt-get update; \
apt-get install -y --no-install-recommends \
git \
; \
\
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer; \
mv /usr/src/roundcubemail/composer.json-dist /usr/src/roundcubemail/composer.json; \
\
composer \
--working-dir=/usr/src/roundcubemail/ \
--prefer-dist --prefer-stable \
--no-update --no-interaction \
--optimize-autoloader --apcu-autoloader \
require \
johndoh/contextmenu \
; \
composer \
--working-dir=/usr/src/roundcubemail/ \
--prefer-dist --no-dev \
--no-interaction \
--optimize-autoloader --apcu-autoloader \
update;
```