mirror of
https://github.com/docker-library/php.git
synced 2025-08-20 13:53:47 +00:00
Add a pid cleaner in case container was killed unexpectedly
This commit is contained in:
@ -67,8 +67,9 @@ RUN buildDeps=" \
|
||||
COPY docker-php-ext-* /usr/local/bin/
|
||||
|
||||
##<autogenerated>##
|
||||
COPY apache2-foreground /usr/local/bin/
|
||||
WORKDIR /var/www/html
|
||||
|
||||
EXPOSE 80
|
||||
CMD ["apache2", "-DFOREGROUND"]
|
||||
CMD ["apache2-foreground"]
|
||||
##</autogenerated>##
|
||||
|
7
5.4/apache/apache2-foreground
Executable file
7
5.4/apache/apache2-foreground
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Apache gets grumpy about PID files pre-existing
|
||||
rm -f /var/run/apache2/apache2.pid
|
||||
|
||||
exec apache2 -DFOREGROUND
|
@ -67,8 +67,9 @@ RUN buildDeps=" \
|
||||
COPY docker-php-ext-* /usr/local/bin/
|
||||
|
||||
##<autogenerated>##
|
||||
COPY apache2-foreground /usr/local/bin/
|
||||
WORKDIR /var/www/html
|
||||
|
||||
EXPOSE 80
|
||||
CMD ["apache2", "-DFOREGROUND"]
|
||||
CMD ["apache2-foreground"]
|
||||
##</autogenerated>##
|
||||
|
7
5.5/apache/apache2-foreground
Executable file
7
5.5/apache/apache2-foreground
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Apache gets grumpy about PID files pre-existing
|
||||
rm -f /var/run/apache2/apache2.pid
|
||||
|
||||
exec apache2 -DFOREGROUND
|
@ -67,8 +67,9 @@ RUN buildDeps=" \
|
||||
COPY docker-php-ext-* /usr/local/bin/
|
||||
|
||||
##<autogenerated>##
|
||||
COPY apache2-foreground /usr/local/bin/
|
||||
WORKDIR /var/www/html
|
||||
|
||||
EXPOSE 80
|
||||
CMD ["apache2", "-DFOREGROUND"]
|
||||
CMD ["apache2-foreground"]
|
||||
##</autogenerated>##
|
||||
|
7
5.6/apache/apache2-foreground
Executable file
7
5.6/apache/apache2-foreground
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Apache gets grumpy about PID files pre-existing
|
||||
rm -f /var/run/apache2/apache2.pid
|
||||
|
||||
exec apache2 -DFOREGROUND
|
@ -1,4 +1,5 @@
|
||||
COPY apache2-foreground /usr/local/bin/
|
||||
WORKDIR /var/www/html
|
||||
|
||||
EXPOSE 80
|
||||
CMD ["apache2", "-DFOREGROUND"]
|
||||
CMD ["apache2-foreground"]
|
||||
|
62
apache2.conf
62
apache2.conf
@ -1,62 +0,0 @@
|
||||
# see http://sources.debian.net/src/apache2/2.4.10-1/debian/config-dir/apache2.conf
|
||||
|
||||
Mutex file:/var/lock/apache2 default
|
||||
PidFile /var/run/apache2/apache2.pid
|
||||
Timeout 300
|
||||
KeepAlive On
|
||||
MaxKeepAliveRequests 100
|
||||
KeepAliveTimeout 5
|
||||
User www-data
|
||||
Group www-data
|
||||
HostnameLookups Off
|
||||
ErrorLog /proc/self/fd/2
|
||||
LogLevel warn
|
||||
|
||||
IncludeOptional mods-enabled/*.load
|
||||
IncludeOptional mods-enabled/*.conf
|
||||
|
||||
# ports.conf
|
||||
Listen 80
|
||||
<IfModule ssl_module>
|
||||
Listen 443
|
||||
</IfModule>
|
||||
<IfModule mod_gnutls.c>
|
||||
Listen 443
|
||||
</IfModule>
|
||||
|
||||
<Directory />
|
||||
Options FollowSymLinks
|
||||
AllowOverride None
|
||||
Require all denied
|
||||
</Directory>
|
||||
|
||||
<Directory /var/www/>
|
||||
Options Indexes FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
DocumentRoot /var/www/html
|
||||
|
||||
AccessFileName .htaccess
|
||||
<FilesMatch "^\.ht">
|
||||
Require all denied
|
||||
</FilesMatch>
|
||||
|
||||
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %O" common
|
||||
LogFormat "%{Referer}i -> %U" referer
|
||||
LogFormat "%{User-agent}i" agent
|
||||
|
||||
CustomLog /proc/self/fd/1 combined
|
||||
|
||||
<FilesMatch \.php$>
|
||||
SetHandler application/x-httpd-php
|
||||
</FilesMatch>
|
||||
|
||||
# Multiple DirectoryIndex directives within the same context will add
|
||||
# to the list of resources to look for rather than replace
|
||||
# https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex
|
||||
DirectoryIndex disabled
|
||||
DirectoryIndex index.php index.html
|
23
php-fpm.conf
23
php-fpm.conf
@ -1,23 +0,0 @@
|
||||
; This file was initially adapated from the output of: (on PHP 5.6)
|
||||
; grep -vE '^;|^ *$' /usr/local/etc/php-fpm.conf.default
|
||||
|
||||
[global]
|
||||
|
||||
error_log = /proc/self/fd/2
|
||||
daemonize = no
|
||||
|
||||
[www]
|
||||
|
||||
; if we send this to /proc/self/fd/1, it never appears
|
||||
access.log = /proc/self/fd/2
|
||||
|
||||
user = www-data
|
||||
group = www-data
|
||||
|
||||
listen = [::]:9000
|
||||
|
||||
pm = dynamic
|
||||
pm.max_children = 5
|
||||
pm.start_servers = 2
|
||||
pm.min_spare_servers = 1
|
||||
pm.max_spare_servers = 3
|
@ -51,9 +51,6 @@ for version in "${versions[@]}"; do
|
||||
s/^(ENV PHP_VERSION) .*/\1 '"$fullVersion"'/;
|
||||
s/^(RUN gpg .* --recv-keys) [0-9a-fA-F ]*$/\1 '"$gpgKey"'/
|
||||
' "$version/Dockerfile" "$version/"*/Dockerfile
|
||||
|
||||
cp apache2.conf "$version/apache/"
|
||||
cp php-fpm.conf "$version/fpm/"
|
||||
)
|
||||
done
|
||||
|
||||
|
Reference in New Issue
Block a user