Skip to content

Commit 23b0906

Browse files
committed
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.
1 parent 28a2d8e commit 23b0906

3 files changed

Lines changed: 25 additions & 63 deletions

File tree

README.md

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -659,20 +659,18 @@ The PHP-CLI extensions should be installed in `workspace/Dockerfile`.
659659

660660
<br>
661661
<a name="Change-the-PHP-FPM-Version"></a>
662-
### Change the PHP-FPM Version
662+
### Change the (PHP-FPM) Version
663663
By default **PHP-FPM 7.0** is running.
664664

665665
>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.
666666

667+
#### A) Switch from PHP `7.0` to PHP `5.6`
668+
667669
1 - Open the `docker-compose.yml`.
668670

669671
2 - Search for `Dockerfile-70` in the PHP container section.
670672

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:
676674

677675
```txt
678676
php-fpm:
@@ -681,19 +679,35 @@ php-fpm:
681679
dockerfile: Dockerfile-70
682680
```
683681

684-
Supported Versions:
682+
4 - Finally rebuild the container
683+
684+
```bash
685+
docker-compose build php
686+
```
685687

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`
689689

690+
1 - Follow the steps of (Switch from PHP `7.0` to PHP `5.6`) except the last one "rebuilding container".
690691

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
692704

693705
```bash
694706
docker-compose build php
695707
```
696708

709+
<br>
710+
697711
For more details about the PHP base image, visit the [official PHP docker images](https://hub.docker.com/_/php/).
698712

699713

php-fpm/Dockerfile-55

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)