Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/cgsmith/yii2-docker into …
Browse files Browse the repository at this point in the history
…cgsmith-master
  • Loading branch information
schmunk42 committed Apr 28, 2021
2 parents b10580e + bae2afa commit e6a4a58
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ jobs:
dockerfile-flavour: "debian"
legacy-gd-lib: ""
pecl-xdebug-suffix: ""
- php-base-image-version: "8.0-fpm"
dockerfile-flavour: "debian"
legacy-gd-lib: ""
pecl-xdebug-suffix: ""
- php-base-image-version: "5.6-apache"
dockerfile-flavour: "debian"
legacy-gd-lib: "1"
Expand Down Expand Up @@ -68,6 +72,11 @@ jobs:
legacy-gd-lib: ""
pecl-xdebug-suffix: ""
pecl-mongodb-suffix: ""
- php-base-image-version: "8.0-apache"
dockerfile-flavour: "debian"
legacy-gd-lib: ""
pecl-xdebug-suffix: ""
pecl-mongodb-suffix: ""
fail-fast: false
env:
PHP_IMAGE_NAME: "yiisoftware/yii2-php"
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ The `Dockerfile`(s) of this repository are designed to build from different PHP-
### Available versions for `yiisoftware/yii2-php`

```
7.4-apache, 7.3-apache
7.4-fpm, 7.3-fpm
8.0-apache, 8.0-fpm
7.4-apache, 7.4-fpm
```

#### Deprecated or EOL versions

```
7.3-apache, 7.3-fpm
7.2-apache, 7.1-apache, 7.0-apache, 5.6-apache
7.2-fpm, 7.1-fpm, 7.0-fpm, 5.6-fpm
```
Expand Down Expand Up @@ -75,3 +76,4 @@ More information can be found in the [docs](/docs) folder.

- We do not officially support Alpine images, due to numerous issues with PHP requirements and because framework tests are not passing.
- Depending on the (Debian) base-image (usually PHP <7.4) you might need to set `X_LEGACY_GD_LIB=1`
- test
12 changes: 5 additions & 7 deletions php/Dockerfile-debian
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,15 @@ RUN if [ $X_LEGACY_GD_LIB = 1 ]; then \

# Install PECL extensions
# see http://stackoverflow.com/a/8154466/291573) for usage of `printf`
# see https://github.com/Imagick/imagick/issues/331#issuecomment-779190777 for usage of `mkdir -p /usr/src/php/ext/imagick`
ARG PECL_XDEBUG_INSTALL_SUFFIX
ARG PECL_MONGODB_INSTALL_SUFFIX
RUN printf "\n" | pecl install \
imagick \
xdebug${PECL_XDEBUG_INSTALL_SUFFIX} \
mongodb${PECL_MONGODB_INSTALL_SUFFIX} && \
mkdir -p /usr/src/php/ext/imagick; \
curl -fsSL https://github.com/Imagick/imagick/archive/06116aa24b76edaf6b1693198f79e6c295eda8a9.tar.gz | tar xvz -C "/usr/src/php/ext/imagick" --strip 1; \
docker-php-ext-install imagick; \
docker-php-ext-enable \
imagick \
mongodb
Expand All @@ -95,16 +98,11 @@ RUN chmod 755 \

# Install composer
RUN curl -sS https://getcomposer.org/installer | php -- \
--version=1.10.22 \
--version=2.0.11 \
--filename=composer.phar \
--install-dir=/usr/local/bin && \
composer clear-cache

# Install composer plugins
RUN composer global require --optimize-autoloader \
"hirak/prestissimo:${VERSION_PRESTISSIMO_PLUGIN}" && \
composer global dumpautoload --optimize && \
composer clear-cache

# Enable mod_rewrite for images with apache
RUN if command -v a2enmod >/dev/null 2>&1; then \
Expand Down

0 comments on commit e6a4a58

Please sign in to comment.