-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: BL-17333 - Dockerfile and resources for Apache PHP 8.2, base im…
…age only (#42) * Dockerfile and resources for apache php8.3 * filename uppercased * force commit change filename * remove filename typo to reprompt gha job * repush failed run * add apache proxy files and sysconfig * lint fixes * lint fixes * lint fixes, removing update command * rm cache apk* to remove unneeded cache load * finally, add package versions * more package versions * attempt ignore for package version until we resolve each package specifically * nocache options * use dockerhub alpine image * add tailing lines, remove superfluous comment * revert to 8.2, scale to base php image * remove defunct zip * php82 file name change
- Loading branch information
Showing
6 changed files
with
78 additions
and
0 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,32 @@ | ||
FROM php:8.2-fpm-alpine3.20 | ||
|
||
# hadolint ignore=DL3018 | ||
RUN apk update && \ | ||
apk upgrade --no-cache && \ | ||
apk add --no-cache \ | ||
jq \ | ||
openrc \ | ||
apache2 \ | ||
apache2-ctl \ | ||
build-base \ | ||
apache2-proxy && \ | ||
apk del php82-apache2 && \ | ||
rm /var/cache/apk/* | ||
|
||
|
||
# (Default Virtual Host is created with Apache install) | ||
# Disable prefork and enable event | ||
RUN sed -ri -e 's!^LoadModule mpm_prefork_module modules/mod_mpm_prefork.so!#LoadModule mpm_prefork_module modules/mod_mpm_prefork.so!g' /etc/apache2/httpd.conf && \ | ||
sed -ri -e 's!^#LoadModule mpm_event_module modules/mod_mpm_event.so!LoadModule mpm_event_module modules/mod_mpm_event.so!g' /etc/apache2/httpd.conf && \ | ||
sed -ri -e 's!^#LoadModule expires_module modules/mod_expires.so!LoadModule expires_module modules/mod_expires.so!g' /etc/apache2/httpd.conf && \ | ||
sed -ri -e 's!^#LoadModule rewrite_module modules/mod_rewrite.so!LoadModule rewrite_module modules/mod_rewrite.so!g' /etc/apache2/httpd.conf | ||
|
||
# Copy Apache FPM proxy config | ||
COPY ./php-fpm-proxy.conf /etc/apache2/conf.d/php-fpm-proxy.conf | ||
|
||
# Apache Config file | ||
COPY ./httpd-sysconfig /etc/sysconfig/httpd | ||
|
||
# Apache service start script | ||
COPY httpd-foreground /usr/local/bin/ | ||
RUN chmod +x /usr/local/bin/httpd-foreground |
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 @@ | ||
#!/bin/sh | ||
set -e | ||
# (this short script is taken from the official Apache Alpine dockerfile) | ||
|
||
# Apache gets grumpy about PID files pre-existing | ||
rm -f /usr/local/apache2/logs/httpd.pid | ||
|
||
exec httpd -DFOREGROUND "$@" |
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 @@ | ||
# | ||
# This file can be used to set additional environment variables for | ||
# the httpd process, or pass additional options to the httpd | ||
# executable. | ||
# | ||
# Note: With previous versions of httpd, the MPM could be changed by | ||
# editing an "HTTPD" variable here. With the current version, that | ||
# variable is now ignored. The MPM is a loadable module, and the | ||
# choice of MPM can be changed by editing the configuration file | ||
# /etc/httpd/conf.modules.d/00-mpm.conf. | ||
# | ||
|
||
# | ||
# To pass additional options (for instance, -D definitions) to the | ||
# httpd binary at startup, set OPTIONS here. | ||
# | ||
#OPTIONS= | ||
|
||
# | ||
# This setting ensures the httpd process is started in the "C" locale | ||
# by default. (Some modules will not behave correctly if | ||
# case-sensitive string comparisons are performed in a different | ||
# locale.) | ||
# | ||
LANG=C | ||
|
||
umask 0027 |
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,3 @@ | ||
<FilesMatch \.php$> | ||
SetHandler "proxy:fcgi://127.0.0.1:9000" | ||
</FilesMatch> |