Skip to content

Commit c4c751a

Browse files
committed
php 5.6 added
1 parent 9bd81b1 commit c4c751a

File tree

5 files changed

+56
-2
lines changed

5 files changed

+56
-2
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@ docker compose up
1515

1616
## Directory Structure
1717
├── docker-files # Dockerfiles for php
18+
├── PHP56.Dockerfile # Dockerfile for php5.6
1819
├── PHP72.Dockerfile # Dockerfile for php7.2
1920
├── PHP74.Dockerfile # Dockerfile for php7.4
2021
├── PHP80.Dockerfile # Dockerfile for php8.0
2122
├── PHP82.Dockerfile # Dockerfile for php8.2
2223
├── mysql-data # Mysql Server Data
2324
├── www # Docker volume for /var/www/html/
25+
├── php56 # Docker volume for /var/www/html/ php5.6
2426
├── php72 # Docker volume for /var/www/html/ php7.2
2527
├── php74 # Docker volume for /var/www/html/ php7.4
2628
├── php80 # Docker volume for /var/www/html/ php8.0
@@ -31,6 +33,7 @@ docker compose up
3133
After running docker compose up put your php application file into www/php{version}. php apache server will run on port 8072, 8074, 8080, 8082
3234
| Container | Port |
3335
| :-------- | :------- |
36+
| `PHP 5.6` | `8056` |
3437
| `PHP 7.2` | `8072` |
3538
| `PHP 7.4` | `8074` |
3639
| `PHP 8.0` | `8080` |

docker-compose.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
version: '3'
2-
services:
2+
services:
3+
php56:
4+
container_name: php56
5+
build:
6+
context: .
7+
dockerfile: ./docker-files/PHP56.Dockerfile
8+
ports:
9+
- "8056:80"
10+
volumes:
11+
- ./www/php56:/var/www/html/
12+
313
php72:
414
container_name: php72
515
build:
@@ -68,4 +78,4 @@ services:
6878
image: adminer
6979
restart: always
7080
ports:
71-
- 9001:8080
81+
- 9001:8080

docker-files/PHP56.Dockerfile

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
FROM php:5.6-apache
2+
3+
# RUN apt-get update && apt-get install -y git
4+
# RUN apt-get install wget && wget https://getcomposer.org/download/latest-stable/composer.phar && chmod 755 composer.phar
5+
# RUN mv composer.phar /usr/local/bin/composer
6+
7+
RUN sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list
8+
RUN sed -i 's|security.debian.org|archive.debian.org/|g' /etc/apt/sources.list
9+
RUN sed -i '/stretch-updates/d' /etc/apt/sources.list
10+
11+
12+
RUN apt-get update && \
13+
apt-get install -y --no-install-recommends \
14+
curl \
15+
libmemcached-dev \
16+
libz-dev \
17+
libpq-dev \
18+
libjpeg-dev \
19+
libjpeg62-turbo-dev\
20+
libfreetype6-dev \
21+
libssl-dev \
22+
libmcrypt-dev
23+
24+
RUN apt-get update && apt-get install -y \
25+
libfreetype6-dev libjpeg62-turbo-dev \
26+
libgd-dev libpng-dev
27+
RUN docker-php-ext-configure gd \
28+
--with-freetype-dir=/usr/include/ \
29+
--with-jpeg-dir=/usr/include/
30+
31+
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
32+
33+
RUN docker-php-ext-install pdo_mysql mbstring mysql mysqli gd
34+
35+
RUN a2enmod rewrite

www/php56/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*
2+
!.gitignore
3+
!index.php

www/php56/index.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
3+
phpinfo();

0 commit comments

Comments
 (0)