-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add PHP 8.4 (without Xdebug as this is not available yet) - Add Xdebug to PHP 8.3 Workspace as it's now supported - Make PHPMyAdmin and phpRedisAdmin optional through profiles to save system resources for those who do not use it
- Loading branch information
1 parent
856baf8
commit bcbe923
Showing
16 changed files
with
511 additions
and
26 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
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,80 @@ | ||
FROM php:8.4-fpm | ||
|
||
LABEL maintainer="Johan van Helden <[email protected]>" | ||
|
||
ARG TZ=UTC | ||
ENV TZ ${TZ} | ||
|
||
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/ | ||
|
||
# Install dependencies | ||
RUN apt-get update && apt-get install -y \ | ||
mariadb-client \ | ||
libfreetype6-dev \ | ||
libjpeg62-turbo-dev \ | ||
libmcrypt-dev \ | ||
libpng-dev \ | ||
libcurl4-nss-dev \ | ||
libc-client-dev \ | ||
libkrb5-dev \ | ||
firebird-dev \ | ||
libicu-dev \ | ||
libxml2-dev \ | ||
libxslt1-dev \ | ||
autoconf \ | ||
wget \ | ||
zip \ | ||
unzip \ | ||
cron \ | ||
git \ | ||
libzip-dev \ | ||
locales-all \ | ||
libonig-dev \ | ||
wkhtmltopdf | ||
|
||
RUN install-php-extensions \ | ||
bcmath \ | ||
exif \ | ||
gd \ | ||
imagick \ | ||
imap \ | ||
intl \ | ||
mysqli \ | ||
pdo_mysql \ | ||
redis \ | ||
soap \ | ||
ssh2 \ | ||
# xdebug \ | ||
xmlrpc \ | ||
xsl \ | ||
zip | ||
|
||
# Set the timezone | ||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||
|
||
# Comment out xdebug extension line per default | ||
# RUN sed -i 's/^zend_extension=/;zend_extension=/g' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini | ||
|
||
# Copy xdebug configuration for remote debugging | ||
# COPY ./includes/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini | ||
|
||
# Copy the php-fpm config | ||
COPY ./includes/dockerhero.fpm.conf /usr/local/etc/php-fpm.d/zzz-dockerhero.fpm.conf | ||
COPY ./includes/dockerhero.php.ini /usr/local/etc/php/conf.d/dockerhero.php.ini | ||
|
||
# Setup mhsendmail | ||
COPY ./includes/mhsendmail_linux_amd64 /usr/local/bin/mhsendmail | ||
RUN chmod +x /usr/local/bin/mhsendmail | ||
|
||
# Cleanup all downloaded packages | ||
RUN apt-get -y autoclean && apt-get -y autoremove && apt-get -y clean && rm -rf /var/lib/apt/lists/* && apt-get update | ||
|
||
# Set the proper permissions | ||
RUN usermod -u 1000 www-data | ||
|
||
# Add the startup script and set executable | ||
COPY ./includes/.startup.sh /var/scripts/.startup.sh | ||
RUN chmod +x /var/scripts/.startup.sh | ||
|
||
# Run the startup script | ||
CMD ["/var/scripts/.startup.sh"] |
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,62 @@ | ||
# dockerhero-php-8.4-fpm | ||
|
||
https://github.com/johanvanhelden/dockerhero | ||
|
||
## Testing the image locally | ||
|
||
``` | ||
$ docker-compose up --build | ||
$ docker exec -it dockerhero-php-8.4-fpm-testing bash | ||
``` | ||
|
||
## Enabled PHP modules | ||
|
||
``` | ||
bcmath | ||
Core | ||
ctype | ||
curl | ||
date | ||
dom | ||
exif | ||
fileinfo | ||
filter | ||
gd | ||
hash | ||
iconv | ||
imagick | ||
imap | ||
intl | ||
json | ||
libxml | ||
mbstring | ||
mysqli | ||
mysqlnd | ||
openssl | ||
pcre | ||
PDO | ||
pdo_mysql | ||
pdo_sqlite | ||
Phar | ||
posix | ||
random | ||
readline | ||
redis | ||
Reflection | ||
session | ||
SimpleXML | ||
soap | ||
sodium | ||
SPL | ||
sqlite3 | ||
ssh2 | ||
standard | ||
tokenizer | ||
xml | ||
xmlreader | ||
xmlrpc | ||
xmlwriter | ||
xsl | ||
zip | ||
zlib | ||
``` |
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,8 @@ | ||
services: | ||
workspace: | ||
container_name: dockerhero-php-8.4-fpm-testing | ||
build: . | ||
volumes: | ||
- ./../:/var/www/projects | ||
tty: true | ||
dns: 8.8.8.8 |
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,10 @@ | ||
#!/bin/bash | ||
|
||
# Inserts the fresh user cronjobs into crontab | ||
crontab /var/crons/crons | ||
|
||
# start cron in the background | ||
cron -f & | ||
|
||
# php-fpm must be started in the foreground | ||
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,10 @@ | ||
catch_workers_output = yes | ||
|
||
php_value[date.timezone] = UTC | ||
php_value[error_reporting] = E_ALL & ~E_STRICT | ||
|
||
php_admin_value[error_log] = /var/log/php/fpm-php.www.log | ||
php_admin_value[sendmail_path] = "/usr/local/bin/mhsendmail --smtp-addr=dockerhero_mail:1025" | ||
php_admin_flag[display_startup_errors] = on | ||
php_flag[display_errors] = On | ||
php_admin_flag[log_errors] = On |
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,2 @@ | ||
date.timezone = "UTC" | ||
sendmail_path = "/usr/local/bin/mhsendmail --smtp-addr=dockerhero_mail:1025" |
Binary file not shown.
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 @@ | ||
; NOTE: The actual debug.so extention is NOT SET HERE but rather (/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini) | ||
|
||
xdebug.mode=debug,profile,develop,coverage,trace | ||
xdebug.start_with_request=yes | ||
|
||
xdebug.discover_client_host=1 | ||
xdebug.client_port=9005 | ||
|
||
xdebug.cli_color=0 | ||
xdebug.var_display_max_depth = -1 | ||
xdebug.var_display_max_children = -1 | ||
xdebug.var_display_max_data = -1 |
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
Oops, something went wrong.