Skip to content

Commit 2332407

Browse files
committed
Add PHP 8.3
1 parent d79a4c5 commit 2332407

File tree

17 files changed

+480
-3
lines changed

17 files changed

+480
-3
lines changed

.github/workflows/docker.yml

+1
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ jobs:
2727
- { context: debian-php-80, tag: php-80 }
2828
- { context: debian-php-81, tag: php-81 }
2929
- { context: debian-php-82, tag: php-82 }
30+
- { context: debian-php-83, tag: php-83 }

Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ docker-build-php-74: _docker-build-php-74
2525
docker-build-php-80: _docker-build-php-80
2626
docker-build-php-81: _docker-build-php-81
2727
docker-build-php-82: _docker-build-php-82
28+
docker-build-php-83: _docker-build-php-83
2829

2930
docker-build-all:
3031
$(MAKE) docker-build-php-70

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
| Image | Distro | PHP |
2222
|-----------------------|--------|-----|
23+
| `dockette/web:php-83` | Buster | 8.3 |
2324
| `dockette/web:php-82` | Buster | 8.2 |
2425
| `dockette/web:php-81` | Buster | 8.1 |
2526
| `dockette/web:php-80` | Buster | 8.0 |
@@ -37,7 +38,7 @@ docker run \
3738
--rm \
3839
--name www \
3940
-p 80:80 \
40-
dockette/web:php-82
41+
dockette/web:php-83
4142
```
4243

4344
## Custom Nginx config
@@ -52,7 +53,7 @@ docker run \
5253
--name www \
5354
-v my-lovely-nginx.conf:/etc/nginx/sites.d/site.conf \
5455
-p 80:80 \
55-
dockette/web:php-82
56+
dockette/web:php-83
5657
```
5758

5859
## Run cron tasks
@@ -67,7 +68,7 @@ docker run \
6768
--name www \
6869
-v my-crontab:/etc/cron.d/app \
6970
-p 80:80 \
70-
dockette/web:php-82
71+
dockette/web:php-83
7172
```
7273

7374
Please note, this crontab should has a little bit different format.

debian-php-83/Dockerfile

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
FROM dockette/debian:buster
2+
3+
# PHP
4+
ENV PHP_MODS_DIR=/etc/php/8.3/mods-available
5+
ENV PHP_CLI_DIR=/etc/php/8.3/cli/
6+
ENV PHP_CLI_CONF_DIR=${PHP_CLI_DIR}/conf.d
7+
ENV PHP_CGI_DIR=/etc/php/8.3/cgi/
8+
ENV PHP_CGI_CONF_DIR=${PHP_CGI_DIR}/conf.d
9+
ENV PHP_FPM_DIR=/etc/php/8.3/fpm/
10+
ENV PHP_FPM_CONF_DIR=${PHP_FPM_DIR}/conf.d
11+
ENV PHP_FPM_POOL_DIR=${PHP_FPM_DIR}/pool.d
12+
ENV PHP_FPM_BIN=/usr/sbin/php-fpm8.3
13+
ENV PHP_FPM_CONF=/etc/php/8.3/php-fpm.conf
14+
ENV TZ=Europe/Prague
15+
16+
# INSTALLATION
17+
RUN apt update && apt dist-upgrade -y && \
18+
# DEPENDENCIES #############################################################
19+
apt install -y wget curl apt-transport-https ca-certificates gnupg2 cron && \
20+
# PHP DEB.SURY.CZ ##########################################################
21+
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg && \
22+
echo "deb https://packages.sury.org/php/ buster main" > /etc/apt/sources.list.d/php.list && \
23+
wget -O- http://nginx.org/keys/nginx_signing.key | apt-key add - && \
24+
echo "deb http://nginx.org/packages/debian/ buster nginx" > /etc/apt/sources.list.d/nginx.list && \
25+
echo "deb-src http://nginx.org/packages/debian/ buster nginx" >> /etc/apt/sources.list.d/nginx.list && \
26+
apt update && \
27+
apt install -y --no-install-recommends \
28+
nginx \
29+
supervisor \
30+
php8.3-apc \
31+
php8.3-apcu \
32+
php8.3-bz2 \
33+
php8.3-bcmath \
34+
php8.3-calendar \
35+
php8.3-cgi \
36+
php8.3-cli \
37+
php8.3-ctype \
38+
php8.3-curl \
39+
php8.3-fpm \
40+
php8.3-gettext \
41+
php8.3-gd \
42+
php8.3-intl \
43+
php8.3-imap \
44+
php8.3-ldap \
45+
php8.3-mbstring \
46+
php8.3-memcached \
47+
php8.3-mongo \
48+
php8.3-mysql \
49+
php8.3-pdo \
50+
php8.3-pgsql \
51+
php8.3-redis \
52+
php8.3-soap \
53+
php8.3-sqlite3 \
54+
php8.3-ssh2 \
55+
php8.3-tidy \
56+
php8.3-zip \
57+
php8.3-xmlrpc \
58+
php8.3-xsl && \
59+
# COMPOSER #################################################################
60+
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --2 && \
61+
# NGINX ####################################################################
62+
ln -sf /dev/stdout /var/log/nginx/access.log && \
63+
ln -sf /dev/stderr /var/log/nginx/error.log && \
64+
# CLEAN UP #################################################################
65+
rm /etc/nginx/conf.d/default.conf && \
66+
apt-get clean -y && \
67+
apt-get autoclean -y && \
68+
apt-get remove -y wget && \
69+
apt-get autoremove -y && \
70+
rm -rf /var/lib/apt/lists/* /var/lib/log/* /tmp/* /var/tmp/*
71+
72+
# PHP
73+
ADD ./php/php-fpm.conf /etc/php/8.3/
74+
ADD ./php/php.ini /etc/php/8.3/conf.d/
75+
76+
# NGINX
77+
ADD ./nginx/nginx.conf /etc/nginx/
78+
ADD ./nginx/mime.types /etc/nginx/
79+
ADD ./nginx/sites.d /etc/nginx/sites.d
80+
81+
# WWW
82+
ADD ./www /srv/www/
83+
84+
# SUPERVISOR
85+
ADD ./supervisor/supervisord.conf /etc/supervisor/
86+
ADD ./supervisor/services /etc/supervisor/conf.d/
87+
88+
# APPLICATION
89+
WORKDIR /srv
90+
91+
# PORTS
92+
EXPOSE 80
93+
COPY entrypoint.sh /usr/sbin/entrypoint.sh
94+
RUN chmod +x /usr/sbin/entrypoint.sh
95+
CMD ["/usr/sbin/entrypoint.sh"]

debian-php-83/entrypoint.sh

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
# loop through all the environment variables and append them to /etc/environment
4+
# because cron doesn't "see" docker environment variables
5+
echo -n > /etc/environment
6+
while IFS='=' read -r key value; do
7+
if [[ ! -z "$key" && ! -z "$value" ]]; then
8+
echo "$key=\"$value\"" >> /etc/environment
9+
fi
10+
done < <(printenv)
11+
12+
# run supervisord
13+
supervisord --nodaemon --configuration /etc/supervisor/supervisord.conf

debian-php-83/nginx/mime.types

+135
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
types {
2+
3+
# Data interchange
4+
5+
application/atom+xml atom;
6+
application/json json map topojson;
7+
application/ld+json jsonld;
8+
application/rss+xml rss;
9+
application/vnd.geo+json geojson;
10+
application/xml rdf xml;
11+
12+
13+
# JavaScript
14+
15+
# Normalize to standard type.
16+
# https://tools.ietf.org/html/rfc4329#section-7.2
17+
application/javascript js;
18+
19+
20+
# Manifest files
21+
22+
application/manifest+json webmanifest;
23+
application/x-web-app-manifest+json webapp;
24+
text/cache-manifest appcache;
25+
26+
27+
# Media files
28+
29+
audio/midi mid midi kar;
30+
audio/mp4 aac f4a f4b m4a;
31+
audio/mpeg mp3;
32+
audio/ogg oga ogg opus;
33+
audio/x-realaudio ra;
34+
audio/x-wav wav;
35+
image/bmp bmp;
36+
image/gif gif;
37+
image/jpeg jpeg jpg;
38+
image/png png;
39+
image/svg+xml svg svgz;
40+
image/tiff tif tiff;
41+
image/vnd.wap.wbmp wbmp;
42+
image/webp webp;
43+
image/x-jng jng;
44+
video/3gpp 3gp 3gpp;
45+
video/mp4 f4p f4v m4v mp4;
46+
video/mpeg mpeg mpg;
47+
video/ogg ogv;
48+
video/quicktime mov;
49+
video/webm webm;
50+
video/x-flv flv;
51+
video/x-mng mng;
52+
video/x-ms-asf asf asx;
53+
video/x-ms-wmv wmv;
54+
video/x-msvideo avi;
55+
56+
# Serving `.ico` image files with a different media type
57+
# prevents Internet Explorer from displaying then as images:
58+
# https://github.com/h5bp/html5-boilerplate/commit/37b5fec090d00f38de64b591bcddcb205aadf8ee
59+
60+
image/x-icon cur ico;
61+
62+
63+
# Microsoft Office
64+
65+
application/msword doc;
66+
application/vnd.ms-excel xls;
67+
application/vnd.ms-powerpoint ppt;
68+
application/vnd.openxmlformats-officedocument.wordprocessingml.document docx;
69+
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx;
70+
application/vnd.openxmlformats-officedocument.presentationml.presentation pptx;
71+
72+
73+
# Web fonts
74+
75+
application/font-woff woff;
76+
application/font-woff2 woff2;
77+
application/vnd.ms-fontobject eot;
78+
79+
# Browsers usually ignore the font media types and simply sniff
80+
# the bytes to figure out the font type.
81+
# https://mimesniff.spec.whatwg.org/#matching-a-font-type-pattern
82+
#
83+
# However, Blink and WebKit based browsers will show a warning
84+
# in the console if the following font types are served with any
85+
# other media types.
86+
87+
application/x-font-ttf ttc ttf;
88+
font/opentype otf;
89+
90+
91+
# Other
92+
93+
application/java-archive ear jar war;
94+
application/mac-binhex40 hqx;
95+
application/octet-stream bin deb dll dmg exe img iso msi msm msp safariextz;
96+
application/pdf pdf;
97+
application/postscript ai eps ps;
98+
application/rtf rtf;
99+
application/vnd.google-earth.kml+xml kml;
100+
application/vnd.google-earth.kmz kmz;
101+
application/vnd.wap.wmlc wmlc;
102+
application/x-7z-compressed 7z;
103+
application/x-bb-appworld bbaw;
104+
application/x-bittorrent torrent;
105+
application/x-chrome-extension crx;
106+
application/x-cocoa cco;
107+
application/x-java-archive-diff jardiff;
108+
application/x-java-jnlp-file jnlp;
109+
application/x-makeself run;
110+
application/x-opera-extension oex;
111+
application/x-perl pl pm;
112+
application/x-pilot pdb prc;
113+
application/x-rar-compressed rar;
114+
application/x-redhat-package-manager rpm;
115+
application/x-sea sea;
116+
application/x-shockwave-flash swf;
117+
application/x-stuffit sit;
118+
application/x-tcl tcl tk;
119+
application/x-x509-ca-cert crt der pem;
120+
application/x-xpinstall xpi;
121+
application/xhtml+xml xhtml;
122+
application/xslt+xml xsl;
123+
application/zip zip;
124+
text/css css;
125+
text/html htm html shtml;
126+
text/mathml mml;
127+
text/plain txt;
128+
text/vcard vcard vcf;
129+
text/vnd.rim.location.xloc xloc;
130+
text/vnd.sun.j2me.app-descriptor jad;
131+
text/vnd.wap.wml wml;
132+
text/vtt vtt;
133+
text/x-component htc;
134+
135+
}

debian-php-83/nginx/nginx.conf

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
user www-data;
2+
worker_processes auto;
3+
worker_rlimit_nofile 8192;
4+
5+
pid /var/run/nginx.pid;
6+
7+
events {
8+
worker_connections 8000;
9+
}
10+
11+
http {
12+
13+
##
14+
# Basic Settings
15+
##
16+
17+
sendfile on;
18+
tcp_nopush on;
19+
tcp_nodelay on;
20+
types_hash_max_size 2048;
21+
server_tokens off;
22+
23+
client_max_body_size 128M;
24+
25+
# server_names_hash_bucket_size 64;
26+
# server_name_in_redirect off;
27+
28+
##
29+
# Charset
30+
##
31+
32+
include /etc/nginx/mime.types;
33+
default_type application/octet-stream;
34+
charset_types text/css text/plain text/vnd.wap.wml application/javascript application/json application/rss+xml application/xml;
35+
36+
##
37+
# Logging Settings
38+
##
39+
40+
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
41+
'$status $body_bytes_sent "$http_referer" '
42+
'"$http_user_agent" "$http_x_forwarded_for"';
43+
44+
access_log /var/log/nginx/access.log;
45+
error_log /var/log/nginx/error.log warn;
46+
47+
##
48+
# Gzip Settings
49+
##
50+
51+
gzip on;
52+
gzip_disable "msie6";
53+
gzip_comp_level 5;
54+
gzip_min_length 256;
55+
gzip_proxied any;
56+
gzip_vary on;
57+
gzip_types
58+
application/atom+xml
59+
application/javascript
60+
application/json
61+
application/ld+json
62+
application/manifest+json
63+
application/rss+xml
64+
application/vnd.geo+json
65+
application/vnd.ms-fontobject
66+
application/x-font-ttf
67+
application/x-web-app-manifest+json
68+
application/xhtml+xml
69+
application/xml
70+
font/opentype
71+
image/bmp
72+
image/svg+xml
73+
image/x-icon
74+
text/cache-manifest
75+
text/css
76+
text/plain
77+
text/vcard
78+
text/vnd.rim.location.xloc
79+
text/vtt
80+
text/x-component
81+
text/x-cross-domain-policy;
82+
83+
##
84+
# Virtual Host Configs
85+
##
86+
87+
include /etc/nginx/conf.d/*.conf;
88+
include /etc/nginx/sites.d/*;
89+
}

0 commit comments

Comments
 (0)