-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
restructure the erdiko images so that they more easily reused
php versions are placed under the docker/php folders in sub folders by version number. each container has its own compose file and the main docker-compose file uses inheritance to generate containers
- Loading branch information
Showing
42 changed files
with
541 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
version: '2' | ||
|
||
services: | ||
webserver: | ||
extends: | ||
file: ./docker/nginx/docker-compose.yml | ||
service: webserver | ||
php: | ||
extends: | ||
file: ./docker/php/7.0/docker-compose.yml | ||
service: php | ||
php71: | ||
extends: | ||
file: ./docker/php/7.1/docker-compose.yml | ||
service: php | ||
php56: | ||
extends: | ||
file: ./docker/php/5.6/docker-compose.yml | ||
service: php | ||
php55: | ||
extends: | ||
file: ./docker/php/5.5/docker-compose.yml | ||
service: php | ||
php55: | ||
extends: | ||
file: ./docker/php/5.4/docker-compose.yml | ||
service: php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Docker | ||
====== | ||
|
||
# Instructions for running a development environment with Docker | ||
# open up docker shell, cd to your lamp docker file e.g. /docker/web and run the following commands... | ||
|
||
#1 Build and run the Docker container | ||
|
||
docker-compose up | ||
|
||
# Your site is now ready |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
version: '2' | ||
|
||
services: | ||
webserver: | ||
container_name: erdiko_nginx | ||
image: nginx:latest | ||
env_file: environment.env | ||
volumes: | ||
- .:/code | ||
- ./docker/nginx/site.conf:/etc/nginx/conf.d/site.conf | ||
- ./docker/nginx/fastcgi.conf:/etc/nginx/fastcgi.conf | ||
ports: | ||
- "8088:80" | ||
php: | ||
container_name: erdiko_php7 | ||
env_file: environment.env | ||
image: erdiko_php7fpm | ||
build: | ||
context: ./docker/php7 | ||
volumes: | ||
- .:/code | ||
- ./docker/php7/conf.d:/usr/local/etc/php/conf.d |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: '2' | ||
|
||
services: | ||
webserver: | ||
container_name: erdiko_nginx | ||
image: nginx:latest | ||
env_file: ../environment.env | ||
volumes: | ||
- ../../:/code | ||
- ./site.conf:/etc/nginx/conf.d/site.conf | ||
- ./fastcgi.conf:/etc/nginx/fastcgi.conf | ||
ports: | ||
- "80:80" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
# Erdiko. It is lean enough for prod but intended for dev | ||
############################################################ | ||
|
||
FROM php:fpm | ||
FROM php:5.4-fpm | ||
|
||
# File Author / Maintainer | ||
MAINTAINER John Arroyo, [email protected] | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
version: '2' | ||
|
||
services: | ||
php: | ||
container_name: erdiko_php_5.4 | ||
env_file: ../../environment.env | ||
image: erdiko_phpfpm_5.4 | ||
build: | ||
context: ./ | ||
volumes: | ||
- ../../../:/code | ||
- ./conf.d:/usr/local/etc/php/conf.d |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
############################################################ | ||
# PHP FPM Container | ||
# | ||
# Contains common and useful... | ||
# php extensions: mcrypt, gd, mysql | ||
# linux packages: mysql-client, git, curl, wget, pwgen | ||
# | ||
# This is a good container for php development and includes | ||
# common tools needed in a PHP app. Use with or without | ||
# Erdiko. It is lean enough for prod but intended for dev | ||
############################################################ | ||
|
||
FROM php:5.5-fpm | ||
|
||
# File Author / Maintainer | ||
MAINTAINER John Arroyo, [email protected] | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y wget \ | ||
git \ | ||
mysql-client \ | ||
curl \ | ||
pwgen \ | ||
libmcrypt-dev \ | ||
libpng-dev \ | ||
&& docker-php-ext-install mysqli \ | ||
pdo_mysql \ | ||
mcrypt \ | ||
gd \ | ||
&& apt-get clean | ||
|
||
# Install additional scripts (composer and phpunit) | ||
COPY scripts /src | ||
RUN cd /src && chmod 770 *.sh | ||
RUN /src/composer.sh | ||
RUN /src/phpunit.sh | ||
|
||
EXPOSE 9000 | ||
|
||
CMD ["php-fpm"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
;/usr/local/etc/php/php.ini | ||
; variables_order = "GPCS" | ||
date.timezone=America/Los_Angeles | ||
|
||
cgi.fix_pathinfo = 0 | ||
|
||
upload_max_filesize = 10M | ||
|
||
# extension=pdo_mysql.so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
version: '2' | ||
|
||
services: | ||
php: | ||
container_name: erdiko_php_5.5 | ||
env_file: ../../environment.env | ||
image: erdiko_phpfpm_5.5 | ||
build: | ||
context: ./ | ||
volumes: | ||
- ../../../:/code | ||
- ./conf.d:/usr/local/etc/php/conf.d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/sh | ||
|
||
# from https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md | ||
EXPECTED_SIGNATURE=$(wget -q -O - https://composer.github.io/installer.sig) | ||
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | ||
ACTUAL_SIGNATURE=$(php -r "echo hash_file('SHA384', 'composer-setup.php');") | ||
|
||
if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ] | ||
then | ||
>&2 echo 'ERROR: Invalid installer signature' | ||
rm composer-setup.php | ||
exit 1 | ||
fi | ||
|
||
php composer-setup.php --quiet | ||
RESULT=$? | ||
rm composer-setup.php | ||
|
||
# Convenient alias (add by Erdiko) | ||
mv composer.phar /usr/local/bin/composer | ||
alias composer='php /usr/local/bin/composer' | ||
|
||
exit $RESULT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
|
||
# Install phpDocumentor, http://phpdoc.org/ | ||
wget http://phpdoc.org/phpDocumentor.phar | ||
chmod +x phpDocumentor.phar | ||
mv phpDocumentor.phar /usr/local/bin/phpdocumentor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
|
||
# Install Phpunit, https://phpunit.de | ||
wget https://phar.phpunit.de/phpunit.phar | ||
chmod +x phpunit.phar | ||
mv phpunit.phar /usr/local/bin/phpunit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
############################################################ | ||
# PHP FPM Container | ||
# | ||
# Contains common and useful... | ||
# php extensions: mcrypt, gd, mysql | ||
# linux packages: mysql-client, git, curl, wget, pwgen | ||
# | ||
# This is a good container for php development and includes | ||
# common tools needed in a PHP app. Use with or without | ||
# Erdiko. It is lean enough for prod but intended for dev | ||
############################################################ | ||
|
||
FROM php:5.6-fpm | ||
|
||
# File Author / Maintainer | ||
MAINTAINER John Arroyo, [email protected] | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y wget \ | ||
git \ | ||
mysql-client \ | ||
curl \ | ||
pwgen \ | ||
libmcrypt-dev \ | ||
libpng-dev \ | ||
&& docker-php-ext-install mysqli \ | ||
pdo_mysql \ | ||
mcrypt \ | ||
gd \ | ||
&& apt-get clean | ||
|
||
# Install additional scripts (composer and phpunit) | ||
COPY scripts /src | ||
RUN cd /src && chmod 770 *.sh | ||
RUN /src/composer.sh | ||
RUN /src/phpunit.sh | ||
|
||
EXPOSE 9000 | ||
|
||
CMD ["php-fpm"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
;/usr/local/etc/php/php.ini | ||
; variables_order = "GPCS" | ||
date.timezone=America/Los_Angeles | ||
|
||
cgi.fix_pathinfo = 0 | ||
|
||
upload_max_filesize = 10M | ||
|
||
# extension=pdo_mysql.so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
version: '2' | ||
|
||
services: | ||
php: | ||
container_name: erdiko_php_5.6 | ||
env_file: ../../environment.env | ||
image: erdiko_phpfpm_5.6 | ||
build: | ||
context: ./ | ||
volumes: | ||
- ../../../:/code | ||
- ./conf.d:/usr/local/etc/php/conf.d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/sh | ||
|
||
# from https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md | ||
EXPECTED_SIGNATURE=$(wget -q -O - https://composer.github.io/installer.sig) | ||
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | ||
ACTUAL_SIGNATURE=$(php -r "echo hash_file('SHA384', 'composer-setup.php');") | ||
|
||
if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ] | ||
then | ||
>&2 echo 'ERROR: Invalid installer signature' | ||
rm composer-setup.php | ||
exit 1 | ||
fi | ||
|
||
php composer-setup.php --quiet | ||
RESULT=$? | ||
rm composer-setup.php | ||
|
||
# Convenient alias (add by Erdiko) | ||
mv composer.phar /usr/local/bin/composer | ||
alias composer='php /usr/local/bin/composer' | ||
|
||
exit $RESULT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
|
||
# Install phpDocumentor, http://phpdoc.org/ | ||
wget http://phpdoc.org/phpDocumentor.phar | ||
chmod +x phpDocumentor.phar | ||
mv phpDocumentor.phar /usr/local/bin/phpdocumentor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
|
||
# Install Phpunit, https://phpunit.de | ||
wget https://phar.phpunit.de/phpunit.phar | ||
chmod +x phpunit.phar | ||
mv phpunit.phar /usr/local/bin/phpunit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
############################################################ | ||
# PHP FPM Container | ||
# | ||
# Contains common and useful... | ||
# php extensions: mcrypt, gd, mysql | ||
# linux packages: mysql-client, git, curl, wget, pwgen | ||
# | ||
# This is a good container for php development and includes | ||
# common tools needed in a PHP app. Use with or without | ||
# Erdiko. It is lean enough for prod or dev. | ||
############################################################ | ||
|
||
FROM php:7.0-fpm | ||
|
||
# File Author / Maintainer | ||
MAINTAINER John Arroyo, [email protected] | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y wget \ | ||
git \ | ||
mysql-client \ | ||
curl \ | ||
pwgen \ | ||
libmcrypt-dev \ | ||
libpng-dev \ | ||
&& docker-php-ext-install mysqli \ | ||
pdo_mysql \ | ||
mcrypt \ | ||
gd \ | ||
&& apt-get clean | ||
|
||
# Install additional scripts (composer and phpunit) | ||
COPY scripts /src | ||
RUN cd /src && chmod 770 *.sh | ||
RUN /src/composer.sh | ||
RUN /src/phpunit.sh | ||
|
||
EXPOSE 9000 | ||
|
||
CMD ["php-fpm"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
;/usr/local/etc/php/php.ini | ||
; variables_order = "GPCS" | ||
date.timezone=America/Los_Angeles | ||
|
||
cgi.fix_pathinfo = 0 | ||
|
||
upload_max_filesize = 10M | ||
|
||
# extension=pdo_mysql.so |
Oops, something went wrong.