Browse Source

Initial commit

Initial commit of forked files from UF Health
master
Chris Wiegman 1 year ago
commit
f0de22c5cd
No known key found for this signature in database GPG Key ID: 449E180845071036
23 changed files with 303 additions and 0 deletions
  1. +47
    -0
      01-Core/7.1/Dockerfile
  2. +20
    -0
      01-Core/7.1/Makefile
  3. +12
    -0
      01-Core/7.1/php.ini
  4. +4
    -0
      01-Core/7.1/start-container.sh
  5. +4
    -0
      01-Core/7.1/xdebug-listen-off.sh
  6. +4
    -0
      01-Core/7.1/xdebug-listen-on.sh
  7. +24
    -0
      01-Core/7.1/xdebug.ini
  8. +47
    -0
      01-Core/7.2/Dockerfile
  9. +20
    -0
      01-Core/7.2/Makefile
  10. +12
    -0
      01-Core/7.2/php.ini
  11. +5
    -0
      01-Core/7.2/start-container.sh
  12. +4
    -0
      01-Core/7.2/xdebug-listen-off.sh
  13. +4
    -0
      01-Core/7.2/xdebug-listen-on.sh
  14. +23
    -0
      01-Core/7.2/xdebug.ini
  15. +7
    -0
      01-Core/Makefile
  16. BIN
      02-Frameworks/.DS_Store
  17. +7
    -0
      02-Frameworks/Makefile
  18. BIN
      02-Frameworks/wordpress/.DS_Store
  19. +16
    -0
      02-Frameworks/wordpress/7.2/Dockerfile
  20. +20
    -0
      02-Frameworks/wordpress/7.2/Makefile
  21. +7
    -0
      02-Frameworks/wordpress/Makefile
  22. +7
    -0
      Makefile
  23. +9
    -0
      README.md

+ 47
- 0
01-Core/7.1/Dockerfile View File

@ -0,0 +1,47 @@
FROM php:7.1-fpm
MAINTAINER cwiegman@ufl.edu
RUN apt-get update
RUN apt-get -y upgrade
RUN apt-get install -y \
libxml2-dev \
libmagickwand-dev \
ssmtp \
mysql-client \
imagemagick
RUN echo "mailhub=mailcatcher:1025\nUseTLS=NO\nFromLineOverride=YES" > /etc/ssmtp/ssmtp.conf
RUN docker-php-ext-install -j$(nproc) \
mysqli
RUN pecl install imagick \
&& docker-php-ext-enable imagick
RUN pecl install xdebug \
&& docker-php-ext-enable xdebug
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j$(nproc) gd
RUN curl -L https://phar.phpunit.de/phpunit.phar > /tmp/phpunit.phar \
&& chmod +x /tmp/phpunit.phar \
&& mv /tmp/phpunit.phar /usr/local/bin/phpunit
ADD php.ini /usr/local/etc/php/php.ini
ADD xdebug.ini /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
ADD xdebug-listen-on.sh /usr/local/bin/xlon.sh
RUN chmod +x /usr/local/bin/xlon.sh
ADD xdebug-listen-off.sh /usr/local/bin/xloff.sh
RUN chmod +x /usr/local/bin/xloff.sh
RUN apt-get remove -y build-essential libz-dev
RUN apt-get autoremove -y
RUN apt-get clean
COPY start-container.sh /usr/local/bin/start-container
RUN chmod +x /usr/local/bin/start-container
CMD ["start-container"]

+ 20
- 0
01-Core/7.1/Makefile View File

@ -0,0 +1,20 @@
NAMESPACE := ufhweb
NAME := php
VERSION := 7.1
all: \
build \
push
build:
docker build --no-cache . -t $(NAMESPACE)/$(NAME):$(VERSION)
docker build . -t gitlab.ahc.ufl.edu:4567/webservices/dev-ops/docker/$(NAME):$(VERSION)
push:
docker push $(NAMESPACE)/$(NAME):$(VERSION)
docker push gitlab.ahc.ufl.edu:4567/webservices/dev-ops/docker/$(NAME):$(VERSION)
.PHONY: \
all \
build \
push

+ 12
- 0
01-Core/7.1/php.ini View File

@ -0,0 +1,12 @@
# Custom PHP settings
memory_limit = 512M
post_max_size = 100M
upload_max_filesize = 100M
max_execution_time = 90
display_errors = Off
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
log_errors = On
error_log = /var/log/php-fpm/error.log
[mail function]
sendmail_path = /usr/sbin/ssmtp -t

+ 4
- 0
01-Core/7.1/start-container.sh View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
sed -i "s/xdebug\.remote_host\=.*/xdebug\.remote_host\=$XDEBUG_HOST/g" /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
php-fpm

+ 4
- 0
01-Core/7.1/xdebug-listen-off.sh View File

@ -0,0 +1,4 @@
#!/bin/bash
sed -i '/xdebug.remote_autostart = 1/d' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
ldconfig

+ 4
- 0
01-Core/7.1/xdebug-listen-on.sh View File

@ -0,0 +1,4 @@
#!/bin/bash
sh -c "grep -q -F 'xdebug.remote_autostart = 1' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini || echo 'xdebug.remote_autostart = 1' >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini"
ldconfig

+ 24
- 0
01-Core/7.1/xdebug.ini View File

@ -0,0 +1,24 @@
zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so
[XDEBUG]
xdebug.collect_includes = 1
xdebug.collect_params = 1
xdebug.collect_return = 1
xdebug.collect_vars = 1
xdebug.dump_globals = 1
xdebug.idekey = DOCKER_DEBUG
xdebug.max_nesting_level = 256
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir = /data/debug
xdebug.profiler_output_name = cachegrind.out.%t-%s
xdebug.remote_connect_back = 0
xdebug.remote_enable = 1
xdebug.remote_host = host.docker.internal
xdebug.remote_log = /data/debug/xdebug-remote.log
xdebug.remote_mode = req
xdebug.remote_port = 9009
xdebug.trace_enable_trigger = 1
xdebug.trace_output_dir = /data/debug
xdebug.var_display_max_children = -1
xdebug.var_display_max_data = -1
xdebug.var_display_max_depth = -1

+ 47
- 0
01-Core/7.2/Dockerfile View File

@ -0,0 +1,47 @@
FROM php:7.2-fpm
MAINTAINER cwiegman@ufl.edu
RUN apt-get update
RUN apt-get -y upgrade
RUN apt-get install -y \
libxml2-dev \
libmagickwand-dev \
ssmtp \
mysql-client \
imagemagick
RUN echo "mailhub=mailcatcher:1025\nUseTLS=NO\nFromLineOverride=YES" > /etc/ssmtp/ssmtp.conf
RUN docker-php-ext-install -j$(nproc) \
mysqli
RUN pecl install imagick \
&& docker-php-ext-enable imagick
RUN pecl install xdebug \
&& docker-php-ext-enable xdebug
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j$(nproc) gd
RUN curl -L https://phar.phpunit.de/phpunit.phar > /tmp/phpunit.phar \
&& chmod +x /tmp/phpunit.phar \
&& mv /tmp/phpunit.phar /usr/local/bin/phpunit
ADD php.ini /usr/local/etc/php/php.ini
ADD xdebug.ini /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
ADD xdebug-listen-on.sh /usr/local/bin/xlon.sh
RUN chmod +x /usr/local/bin/xlon.sh
ADD xdebug-listen-off.sh /usr/local/bin/xloff.sh
RUN chmod +x /usr/local/bin/xloff.sh
RUN apt-get remove -y build-essential libz-dev
RUN apt-get autoremove -y
RUN apt-get clean
COPY start-container.sh /usr/local/bin/start-container
RUN chmod +x /usr/local/bin/start-container
CMD ["start-container"]

+ 20
- 0
01-Core/7.2/Makefile View File

@ -0,0 +1,20 @@
NAMESPACE := ufhweb
NAME := php
VERSION := 7.2
all: \
build \
push
build:
docker build --no-cache . -t $(NAMESPACE)/$(NAME):$(VERSION)
docker build . -t gitlab.ahc.ufl.edu:4567/webservices/dev-ops/docker/$(NAME):$(VERSION)
push:
docker push $(NAMESPACE)/$(NAME):$(VERSION)
docker push gitlab.ahc.ufl.edu:4567/webservices/dev-ops/docker/$(NAME):$(VERSION)
.PHONY: \
all \
build \
push

+ 12
- 0
01-Core/7.2/php.ini View File

@ -0,0 +1,12 @@
# Custom PHP settings
memory_limit = 512M
post_max_size = 100M
upload_max_filesize = 100M
max_execution_time = 90
display_errors = Off
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
log_errors = On
error_log = /var/log/php-fpm/error.log
[mail function]
sendmail_path = /usr/sbin/ssmtp -t

+ 5
- 0
01-Core/7.2/start-container.sh View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
sed -i "s/xdebug\.remote_host\=.*/xdebug\.remote_host\=$XDEBUG_HOST/g" /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
php-fpm

+ 4
- 0
01-Core/7.2/xdebug-listen-off.sh View File

@ -0,0 +1,4 @@
#!/bin/bash
sed -i '/xdebug.remote_autostart = 1/d' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
ldconfig

+ 4
- 0
01-Core/7.2/xdebug-listen-on.sh View File

@ -0,0 +1,4 @@
#!/bin/bash
sh -c "grep -q -F 'xdebug.remote_autostart = 1' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini || echo 'xdebug.remote_autostart = 1' >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini"
ldconfig

+ 23
- 0
01-Core/7.2/xdebug.ini View File

@ -0,0 +1,23 @@
zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20170718/xdebug.so
[XDEBUG]
xdebug.collect_includes = 1
xdebug.collect_params = 1
xdebug.collect_return = 1
xdebug.collect_vars = 1
xdebug.dump_globals = 1
xdebug.idekey = DOCKER_DEBUG
xdebug.max_nesting_level = 256
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir = /data/debug
xdebug.profiler_output_name = cachegrind.out.%t-%s
xdebug.remote_enable = 1
xdebug.remote_host=host.docker.internal
xdebug.remote_log = /data/debug/xdebug-remote.log
xdebug.remote_mode = req
xdebug.remote_port = 9000
xdebug.trace_enable_trigger = 1
xdebug.trace_output_dir = /data/debug
xdebug.var_display_max_children = -1
xdebug.var_display_max_data = -1
xdebug.var_display_max_depth = -1

+ 7
- 0
01-Core/Makefile View File

@ -0,0 +1,7 @@
SUBDIRS = $(sort $(dir $(wildcard */.)))
all: $(SUBDIRS)
$(SUBDIRS):
$(MAKE) -C $@
.PHONY: all $(SUBDIRS)

BIN
02-Frameworks/.DS_Store View File


+ 7
- 0
02-Frameworks/Makefile View File

@ -0,0 +1,7 @@
SUBDIRS = $(sort $(dir $(wildcard */.)))
all: $(SUBDIRS)
$(SUBDIRS):
$(MAKE) -C $@
.PHONY: all $(SUBDIRS)

BIN
02-Frameworks/wordpress/.DS_Store View File


+ 16
- 0
02-Frameworks/wordpress/7.2/Dockerfile View File

@ -0,0 +1,16 @@
FROM ufhweb/php:7.2
MAINTAINER cwiegman@ufl.edu
RUN apt-get update
RUN apt-get -y upgrade
RUN apt-get install -y \
less subversion
RUN curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar > wp-cli.phar \
&& chmod +x wp-cli.phar \
&& mv wp-cli.phar /usr/local/bin/wp
RUN apt-get autoremove -y
RUN apt-get clean
RUN mkdir /var/www/.wp-cli && chmod 0777 /var/www/.wp-cli

+ 20
- 0
02-Frameworks/wordpress/7.2/Makefile View File

@ -0,0 +1,20 @@
NAMESPACE := ufhweb
NAME := php
VERSION := 7.2-wordpress
all: \
build \
push
build:
docker build --no-cache . -t $(NAMESPACE)/$(NAME):$(VERSION)
docker build . -t gitlab.ahc.ufl.edu:4567/webservices/dev-ops/docker/$(NAME):$(VERSION)
push:
docker push $(NAMESPACE)/$(NAME):$(VERSION)
docker push gitlab.ahc.ufl.edu:4567/webservices/dev-ops/docker/$(NAME):$(VERSION)
.PHONY: \
all \
build \
push

+ 7
- 0
02-Frameworks/wordpress/Makefile View File

@ -0,0 +1,7 @@
SUBDIRS = $(sort $(dir $(wildcard */.)))
all: $(SUBDIRS)
$(SUBDIRS):
$(MAKE) -C $@
.PHONY: all $(SUBDIRS)

+ 7
- 0
Makefile View File

@ -0,0 +1,7 @@
SUBDIRS = $(sort $(dir $(wildcard */.)))
all: $(SUBDIRS)
$(SUBDIRS):
$(MAKE) -C $@
.PHONY: all $(SUBDIRS)

+ 9
- 0
README.md View File

@ -0,0 +1,9 @@
# Docker PHP Images
PHP images built specifically for Web Services development.
### Avoiding Certificate Errors
In order to avoid SSL certificate errors when working with GIT LFS use the following after downloading the repo:
```git config http.sslVerify false```