Skip to content

Commit 1833d86

Browse files
committed
initial commit
0 parents  commit 1833d86

File tree

8 files changed

+133
-0
lines changed

8 files changed

+133
-0
lines changed

5.3/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM phpplatform/php-apache:5.3
2+
3+
RUN apt-get update -yqq \
4+
&& apt-get install git -yqq \
5+
&& apt-get install wget -yqq \
6+
&& apt-get install zip -yqq \
7+
&& apt-get install unzip -yqq
8+
9+
RUN apt-get install wget -yqq && wget https://composer.github.io/installer.sig -O - -q | tr -d '\n' > installer.sig \
10+
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
11+
&& php -r "if (hash_file('SHA384', 'composer-setup.php') === file_get_contents('installer.sig')) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
12+
&& php composer-setup.php \
13+
&& php -r "unlink('composer-setup.php'); unlink('installer.sig');" \
14+
15+
CMD ["apache2", "-DFOREGROUND"]
16+

5.4/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM phpplatform/php-apache:5.4
2+
3+
RUN apt-get update -yqq \
4+
&& apt-get install git -yqq \
5+
&& apt-get install wget -yqq \
6+
&& apt-get install zip -yqq \
7+
&& apt-get install unzip -yqq
8+
9+
RUN wget https://composer.github.io/installer.sig -O - -q | tr -d '\n' > installer.sig \
10+
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
11+
&& php -r "if (hash_file('SHA384', 'composer-setup.php') === file_get_contents('installer.sig')) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
12+
&& php composer-setup.php \
13+
&& php -r "unlink('composer-setup.php'); unlink('installer.sig');" \
14+
&& mv composer.phar /usr/local/bin/composer
15+
16+
CMD ["apache2-foreground"]

5.5/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM phpplatform/php-apache:5.5
2+
3+
RUN apt-get update -yqq \
4+
&& apt-get install git -yqq \
5+
&& apt-get install wget -yqq \
6+
&& apt-get install zip -yqq \
7+
&& apt-get install unzip -yqq
8+
9+
RUN wget https://composer.github.io/installer.sig -O - -q | tr -d '\n' > installer.sig \
10+
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
11+
&& php -r "if (hash_file('SHA384', 'composer-setup.php') === file_get_contents('installer.sig')) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
12+
&& php composer-setup.php \
13+
&& php -r "unlink('composer-setup.php'); unlink('installer.sig');" \
14+
&& mv composer.phar /usr/local/bin/composer
15+
16+
CMD ["apache2-foreground"]

5.6/Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM phpplatform/php-apache:5.6
2+
3+
RUN yes | pecl install xdebug \
4+
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
5+
&& echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/xdebug.ini \
6+
&& echo "xdebug.remote_autostart=off" >> /usr/local/etc/php/conf.d/xdebug.ini
7+
8+
RUN apt-get update -yqq \
9+
&& apt-get install git -yqq \
10+
&& apt-get install wget -yqq \
11+
&& apt-get install zip -yqq \
12+
&& apt-get install unzip -yqq
13+
14+
RUN wget https://composer.github.io/installer.sig -O - -q | tr -d '\n' > installer.sig \
15+
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
16+
&& php -r "if (hash_file('SHA384', 'composer-setup.php') === file_get_contents('installer.sig')) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
17+
&& php composer-setup.php \
18+
&& php -r "unlink('composer-setup.php'); unlink('installer.sig');" \
19+
&& mv composer.phar /usr/local/bin/composer
20+
21+
ENTRYPOINT ["docker-php-entrypoint"]
22+
CMD ["apache2-foreground"]

7.0/Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM phpplatform/php-apache:7.0
2+
3+
RUN apt-get update -yqq \
4+
&& apt-get install git -yqq \
5+
&& apt-get install wget -yqq \
6+
&& apt-get install zip -yqq \
7+
&& apt-get install unzip -yqq
8+
9+
RUN wget https://composer.github.io/installer.sig -O - -q | tr -d '\n' > installer.sig \
10+
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
11+
&& php -r "if (hash_file('SHA384', 'composer-setup.php') === file_get_contents('installer.sig')) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
12+
&& php composer-setup.php \
13+
&& php -r "unlink('composer-setup.php'); unlink('installer.sig');" \
14+
&& mv composer.phar /usr/local/bin/composer
15+
16+
ENTRYPOINT ["docker-php-entrypoint"]
17+
CMD ["apache2-foreground"]

7.1/Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM phpplatform/php-apache:7.1
2+
3+
RUN apt-get update -yqq \
4+
&& apt-get install git -yqq \
5+
&& apt-get install wget -yqq \
6+
&& apt-get install zip -yqq \
7+
&& apt-get install unzip -yqq
8+
9+
RUN wget https://composer.github.io/installer.sig -O - -q | tr -d '\n' > installer.sig \
10+
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
11+
&& php -r "if (hash_file('SHA384', 'composer-setup.php') === file_get_contents('installer.sig')) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
12+
&& php composer-setup.php \
13+
&& php -r "unlink('composer-setup.php'); unlink('installer.sig');" \
14+
&& mv composer.phar /usr/local/bin/composer
15+
16+
ENTRYPOINT ["docker-php-entrypoint"]
17+
CMD ["apache2-foreground"]

7.2/Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM phpplatform/php-apache:7.2
2+
3+
RUN apt-get update -yqq \
4+
&& apt-get install git -yqq \
5+
&& apt-get install wget -yqq \
6+
&& apt-get install zip -yqq \
7+
&& apt-get install unzip -yqq
8+
9+
RUN wget https://composer.github.io/installer.sig -O - -q | tr -d '\n' > installer.sig \
10+
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
11+
&& php -r "if (hash_file('SHA384', 'composer-setup.php') === file_get_contents('installer.sig')) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
12+
&& php composer-setup.php \
13+
&& php -r "unlink('composer-setup.php'); unlink('installer.sig');" \
14+
&& mv composer.phar /usr/local/bin/composer
15+
16+
ENTRYPOINT ["docker-php-entrypoint"]
17+
CMD ["apache2-foreground"]

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Docker Images for PHP Development
2+
3+
This repo contains DockerFiles to build docker images containing software components (PHP + Apache + Composer)
4+
5+
The Images are built in this order
6+
7+
- docker-library/php is forked into PHPPlatform/docker-php-apache in github
8+
- created new branches to support older version of php in PHPPlatform/docker-php-apache
9+
- phpplatform/php-apache docker images are automatically built in docker hub , linked to PHPPlatform/docker-php-apache github repo
10+
- This repo uses images from phpplatform/php-apache to add Composer and Xdebug
11+
- docker images are built automatically at phpplatform/php-apache-composer-xdebug in Docker HUb
12+

0 commit comments

Comments
 (0)