You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
delete the Dockerfile-55 file and rename Dockerfile-56 to Dockerfile-5
Since 5.5 and 5.6 dockerfiles are identical execept the base image php version.
Will let the users switch the php 5.6 and 5.5 version from the Dockerfile-5 by changing one char
in the first line. Removing this duplication will make contribution and maintance easier and faster.
Copy file name to clipboardExpand all lines: README.md
+25-11Lines changed: 25 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -659,20 +659,18 @@ The PHP-CLI extensions should be installed in `workspace/Dockerfile`.
659
659
660
660
<br>
661
661
<a name="Change-the-PHP-FPM-Version"></a>
662
-
### Change the PHP-FPM Version
662
+
### Change the (PHP-FPM) Version
663
663
By default **PHP-FPM 7.0** is running.
664
664
665
665
>The PHP-FPM is responsible of serving your application code, you don't have to change the PHP-CLI version if you are planing to run your application on different PHP-FPM version.
666
666
667
+
#### A) Switch from PHP `7.0` to PHP `5.6`
668
+
667
669
1 - Open the `docker-compose.yml`.
668
670
669
671
2 - Search for `Dockerfile-70` in the PHP container section.
670
672
671
-
3 - Change the version number.
672
-
<br>
673
-
Example to select version 5.6 instead of 7.0 you have to replace `Dockerfile-70` with `Dockerfile-56`.
674
-
675
-
Sample:
673
+
3 - Change the version number, by replacing `Dockerfile-70` with `Dockerfile-5`, like this:
676
674
677
675
```txt
678
676
php-fpm:
@@ -681,19 +679,35 @@ php-fpm:
681
679
dockerfile: Dockerfile-70
682
680
```
683
681
684
-
Supported Versions:
682
+
4 - Finally rebuild the container
683
+
684
+
```bash
685
+
docker-compose build php
686
+
```
685
687
686
-
- For (PHP 7.0.*) use `Dockerfile-70`
687
-
- For (PHP 5.6.*) use `Dockerfile-56`
688
-
- For (PHP 5.5.*) use `Dockerfile-55`
688
+
#### B) Switch from PHP `7.0` or `5.6` to PHP `5.5`
689
689
690
+
1 - Follow the steps of (Switch from PHP `7.0` to PHP `5.6`) except the last one "rebuilding container".
690
691
691
-
4 - Finally rebuild the container
692
+
2 - Open the `docker-compose.yml` again and make sure you are using `Dockerfile-5` like this:
693
+
694
+
```txt
695
+
php-fpm:
696
+
build:
697
+
context: ./php-fpm
698
+
dockerfile: Dockerfile-5
699
+
```
700
+
701
+
3 - Open `php-fpm/Dockerfile-5` file and on the first line replace the PHP version from (`FROM php:5.6-fpm`) to (`FROM php:5.5-fpm`).
702
+
703
+
4 - Now you can rebuild the container
692
704
693
705
```bash
694
706
docker-compose build php
695
707
```
696
708
709
+
<br>
710
+
697
711
For more details about the PHP base image, visit the [official PHP docker images](https://hub.docker.com/_/php/).
0 commit comments