Skip to content

Commit 2e256d1

Browse files
committed
Add abc-base:8.5
1 parent ab4047a commit 2e256d1

File tree

10 files changed

+227
-0
lines changed

10 files changed

+227
-0
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
- "abc-base:8.3"
2222
- "abc-base:8.4"
2323
- "abc-base:8.4-frankenphp"
24+
- "abc-base:8.5"
2425
arch:
2526
- amd64
2627
- arm64

abc-base/8.5/Dockerfile

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
FROM php:8.5-fpm-trixie
2+
3+
# Install dependencies and PHP extensions.
4+
COPY ./apt /etc/apt
5+
RUN set -x \
6+
# Setup the nginx debian repo.
7+
&& VERSION_CODENAME="$(awk -F= '/^VERSION_CODENAME=/ { print $2 }' /etc/os-release)" \
8+
&& echo "deb [signed-by=/etc/apt/nginx-archive-keyring.gpg] http://nginx.org/packages/mainline/debian $VERSION_CODENAME nginx" > /etc/apt/sources.list.d/nginx.list \
9+
# Symlink supervisord config.
10+
&& ln -s /usr/local/etc/supervisord.conf /etc/ \
11+
# Web-writable state directory and nginx listener directory.
12+
&& install -d -o www-data -g www-data /run/www /run/listen \
13+
# Empty default crontab.
14+
&& touch /etc/crontab \
15+
# Run-time dependencies.
16+
&& apt-get update \
17+
&& apt-get install -y --no-install-recommends \
18+
libgd3 \
19+
libgmpxx4ldbl \
20+
libmemcached11 \
21+
libmemcachedutil2 \
22+
libpq5 \
23+
libzip5 \
24+
nginx \
25+
tini \
26+
unzip \
27+
zlib1g \
28+
supervisor \
29+
jq \
30+
pwgen \
31+
default-mysql-client \
32+
vim \
33+
&& savedAptMark="$(apt-mark showmanual)" \
34+
# Build-time dependencies.
35+
&& apt-get install -y --no-install-recommends \
36+
icu-devtools \
37+
libgd-dev \
38+
libgmp-dev \
39+
libicu-dev \
40+
libldap2-dev \
41+
libmemcached-dev \
42+
libonig-dev \
43+
libpq-dev \
44+
libsqlite3-dev \
45+
libzip-dev \
46+
zlib1g-dev \
47+
# Build PHP extensions.
48+
&& docker-php-ext-configure gd \
49+
--with-external-gd \
50+
&& docker-php-ext-configure zip \
51+
--with-zip \
52+
&& docker-php-ext-configure pdo_mysql \
53+
&& docker-php-ext-install \
54+
exif \
55+
gd \
56+
gettext \
57+
gmp \
58+
intl \
59+
ldap \
60+
mbstring \
61+
pcntl \
62+
pdo_mysql \
63+
pdo_pgsql \
64+
pdo_sqlite \
65+
zip \
66+
&& pecl install \
67+
memcached \
68+
redis \
69+
&& docker-php-ext-enable \
70+
memcached \
71+
redis \
72+
# Cleanup.
73+
&& apt-mark auto '.*' > /dev/null \
74+
&& apt-mark manual $savedAptMark > /dev/null \
75+
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
76+
&& rm -r \
77+
/var/lib/apt/lists/* \
78+
/tmp/pear \
79+
# Remove PHP FPM config, because we'll replace it.
80+
&& rm -fr /usr/local/etc/php-fpm.* \
81+
# Ensure nginx directories are writable.
82+
&& rm -fr /var/log/nginx /var/cache/nginx \
83+
&& install -d -o www-data -g www-data /var/log/nginx /var/cache/nginx
84+
85+
# Copy MinIO client.
86+
COPY --from=minio/mc:latest /usr/bin/mc /usr/bin/mc
87+
88+
# Copy pocketcron.
89+
COPY --from=ghcr.io/stephank/pocketcron /usr/bin/pocketcron /usr/bin/pocketcron
90+
91+
# Copy configuration files and scripts.
92+
COPY usrlocal/ /usr/local/
93+
COPY nginx/ /etc/nginx/
94+
95+
# Image configuration.
96+
ENTRYPOINT ["/usr/bin/tini", "--"]
97+
CMD ["supervisord"]
8.34 KB
Binary file not shown.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Package: *
2+
Pin: origin nginx.org
3+
Pin: release o=nginx
4+
Pin-Priority: 900

abc-base/8.5/nginx/abc_vhost

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# This file is meant to be included in ABC Manager vhosts. It proxies *.php
2+
# requests to PHP FPM, and sets up rewriting to index.php.
3+
4+
index index.php index.html;
5+
6+
location / {
7+
try_files $uri $uri/ /index.php$is_args$args;
8+
}
9+
10+
location ~ \.php$ {
11+
include fastcgi_params;
12+
13+
fastcgi_pass unix:/run/www/php-fpm.sock;
14+
fastcgi_index index.php;
15+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
16+
}

abc-base/8.5/nginx/nginx.conf

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
worker_processes 1;
2+
3+
error_log /dev/stderr warn;
4+
pid /run/www/nginx.pid;
5+
6+
events {
7+
worker_connections 1024;
8+
}
9+
10+
http {
11+
include /etc/nginx/mime.types;
12+
default_type application/octet-stream;
13+
14+
access_log /dev/stdout combined;
15+
16+
sendfile on;
17+
tcp_nopush on;
18+
tcp_nodelay on;
19+
gzip_static on;
20+
server_tokens off;
21+
22+
# Disable tasks handled by front proxies.
23+
proxy_buffering off;
24+
proxy_request_buffering off;
25+
fastcgi_buffering off;
26+
fastcgi_request_buffering off;
27+
client_max_body_size 0;
28+
29+
include /etc/nginx/conf.d/*.conf;
30+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/sh
2+
set -e
3+
4+
# Small helper that takes a list of docroot-relative paths, and sets them up as
5+
# symlinks to the shared volume.
6+
#
7+
# By default, creates links in `/var/www/html` to `/shared`, but these can be
8+
# overridden with the `PROJECT_ROOT` and `SHARED_ROOT` environment variables.
9+
#
10+
# Note that the `PROJECT_ROOT` paths are trashed.
11+
12+
SHARED_ROOT="${SHARED_ROOT:-/shared}"
13+
PROJECT_ROOT="${PROJECT_ROOT:-/var/www/html}"
14+
15+
for f in "$@"; do
16+
echo "${PROJECT_ROOT}/${f} -> ${SHARED_ROOT}/${f}"
17+
rm -fr "${PROJECT_ROOT}/${f}"
18+
ln -s "${SHARED_ROOT}/${f}" "${PROJECT_ROOT}/${f}"
19+
done
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[global]
2+
daemonize = no
3+
error_log = /proc/self/fd/2
4+
5+
[www]
6+
listen = /run/www/php-fpm.sock
7+
8+
clear_env = no
9+
catch_workers_output = yes
10+
decorate_workers_output = no
11+
12+
pm = dynamic
13+
pm.max_children = 5
14+
pm.start_servers = 2
15+
pm.min_spare_servers = 1
16+
pm.max_spare_servers = 3
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
; Any global PHP configuration can be added here.
2+
3+
; Disable X-Powered-By header
4+
expose_php = Off
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
[unix_http_server]
2+
file=/run/www/supervisor.sock
3+
4+
[supervisord]
5+
user=www-data
6+
nodaemon=true
7+
logfile=/dev/null
8+
logfile_maxbytes=0
9+
pidfile=/run/www/supervisor.pid
10+
11+
[rpcinterface:supervisor]
12+
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
13+
14+
[supervisorctl]
15+
serverurl=unix:///run/www/supervisor.sock
16+
17+
18+
[program:php-fpm]
19+
priority=200
20+
command=php-fpm
21+
stdout_logfile=/dev/fd/1
22+
stdout_logfile_maxbytes=0
23+
stderr_logfile=/dev/fd/2
24+
stderr_logfile_maxbytes=0
25+
26+
[program:nginx]
27+
priority=300
28+
command=nginx -g 'daemon off;'
29+
stdout_logfile=/dev/fd/1
30+
stdout_logfile_maxbytes=0
31+
stderr_logfile=/dev/fd/2
32+
stderr_logfile_maxbytes=0
33+
34+
[program:cron]
35+
priority=300
36+
command=pocketcron /etc/crontab
37+
stdout_logfile=/dev/fd/1
38+
stdout_logfile_maxbytes=0
39+
stderr_logfile=/dev/fd/2
40+
stderr_logfile_maxbytes=0

0 commit comments

Comments
 (0)