Skip to content

Commit 17f3d27

Browse files
committed
Add PHP 8.4 version
1 parent 8d1601c commit 17f3d27

File tree

17 files changed

+486
-10
lines changed

17 files changed

+486
-10
lines changed

.github/workflows/docker.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ jobs:
3030
- { context: debian-php-81, tag: php-81 }
3131
- { context: debian-php-82, tag: php-82 }
3232
- { context: debian-php-83, tag: php-83 }
33+
- { context: debian-php-84, tag: php-84 }

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ templates:
99
cp -R .templates/ debian-php-80
1010
cp -R .templates/ debian-php-81
1111
cp -R .templates/ debian-php-82
12+
cp -R .templates/ debian-php-83
13+
cp -R .templates/ debian-php-84
1214

1315
_docker-build-%: VERSION=$*
1416
_docker-build-%:
@@ -26,6 +28,7 @@ docker-build-php-80: _docker-build-php-80
2628
docker-build-php-81: _docker-build-php-81
2729
docker-build-php-82: _docker-build-php-82
2830
docker-build-php-83: _docker-build-php-83
31+
docker-build-php-84: _docker-build-php-84
2932

3033
docker-build-all:
3134
$(MAKE) docker-build-php-70
@@ -37,6 +40,7 @@ docker-build-all:
3740
$(MAKE) docker-build-php-81
3841
$(MAKE) docker-build-php-82
3942
$(MAKE) docker-build-php-83
43+
$(MAKE) docker-build-php-84
4044

4145

4246
docker-test-all:
@@ -49,6 +53,7 @@ docker-test-all:
4953
$(MAKE) _docker-test-php-81
5054
$(MAKE) _docker-test-php-82
5155
$(MAKE) _docker-test-php-83
56+
$(MAKE) _docker-test-php-84
5257

5358
_docker-test-%: VERSION=$*
5459
_docker-test-%:

README.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<h1 align=center>Dockette / Web</h1>
22

33
<p align=center>
4-
🐳 Ready-to-use docker images for websites (nginx, PHP 7.0/7.1/7.2/7.3/7.4/8.0/8.1/8.2/8.3 + FPM, supervisor, cron).
4+
🐳 Ready-to-use docker images for websites (nginx, PHP 7.0/7.1/7.2/7.3/7.4/8.0/8.1/8.2/8.3/8.4 + FPM, supervisor, cron).
55
</p>
66

77
<p align=center>
@@ -20,6 +20,7 @@
2020

2121
| Image | Distro | PHP |
2222
|-----------------------|----------|-----|
23+
| `dockette/web:php-84` | Bookworm | 8.4 |
2324
| `dockette/web:php-83` | Bookworm | 8.3 |
2425
| `dockette/web:php-82` | Bookworm | 8.2 |
2526
| `dockette/web:php-81` | Bookworm | 8.1 |
@@ -38,7 +39,7 @@ docker run \
3839
--rm \
3940
--name www \
4041
-p 80:80 \
41-
dockette/web:php-83
42+
dockette/web:php-84
4243
```
4344

4445
## Custom Nginx config
@@ -53,7 +54,7 @@ docker run \
5354
--name www \
5455
-v my-lovely-nginx.conf:/etc/nginx/sites.d/site.conf \
5556
-p 80:80 \
56-
dockette/web:php-83
57+
dockette/web:php-84
5758
```
5859

5960
## Run cron tasks
@@ -68,7 +69,7 @@ docker run \
6869
--name www \
6970
-v my-crontab:/etc/cron.d/app \
7071
-p 80:80 \
71-
dockette/web:php-83
72+
dockette/web:php-84
7273
```
7374

7475
Please note, this crontab should has a little bit different format.
@@ -78,16 +79,12 @@ There is also username, for example:
7879
57 19 * * * www-data my_command
7980
```
8081

81-
## Development
82-
83-
See [how to contribute](https://contributte.org/contributing.html) to this package.
84-
85-
This package is currently maintaining by these authors.
82+
## Credits
8683

8784
<a href="https://github.com/f3l1x">
8885
<img width="80" height="80" src="https://avatars2.githubusercontent.com/u/538058?v=3&s=80">
8986
</a>
9087

9188
-----
9289

93-
Consider to [support](https://github.com/sponsors/f3l1x) **f3l1x**. Also thank you for using this package.
90+
Consider to [support](https://bit.ly/f3l1xsponsor) **f3l1x**. Also thank you for using this package.

debian-php-84/Dockerfile

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
FROM dockette/debian:bookworm
2+
3+
# PHP
4+
ENV PHP_MODS_DIR=/etc/php/8.4/mods-available
5+
ENV PHP_CLI_DIR=/etc/php/8.4/cli/
6+
ENV PHP_CLI_CONF_DIR=${PHP_CLI_DIR}/conf.d
7+
ENV PHP_CGI_DIR=/etc/php/8.4/cgi/
8+
ENV PHP_CGI_CONF_DIR=${PHP_CGI_DIR}/conf.d
9+
ENV PHP_FPM_DIR=/etc/php/8.4/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.4
13+
ENV PHP_FPM_CONF=/etc/php/8.4/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/ bookworm 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/ bookworm nginx" > /etc/apt/sources.list.d/nginx.list && \
25+
echo "deb-src http://nginx.org/packages/debian/ bookworm nginx" >> /etc/apt/sources.list.d/nginx.list && \
26+
apt update && \
27+
apt install -y --no-install-recommends \
28+
nginx \
29+
supervisor \
30+
php8.4-apcu \
31+
php8.4-bz2 \
32+
php8.4-bcmath \
33+
php8.4-calendar \
34+
php8.4-cgi \
35+
php8.4-cli \
36+
php8.4-ctype \
37+
php8.4-curl \
38+
php8.4-fpm \
39+
php8.4-gettext \
40+
php8.4-gd \
41+
php8.4-intl \
42+
php8.4-imap \
43+
php8.4-ldap \
44+
php8.4-mbstring \
45+
php8.4-memcached \
46+
# php8.4-mongo \
47+
php8.4-mysql \
48+
php8.4-pdo \
49+
php8.4-pgsql \
50+
php8.4-redis \
51+
php8.4-soap \
52+
php8.4-sqlite3 \
53+
php8.4-ssh2 \
54+
php8.4-tidy \
55+
php8.4-zip \
56+
php8.4-xmlrpc \
57+
php8.4-xsl && \
58+
# COMPOSER #################################################################
59+
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --2 && \
60+
# NGINX ####################################################################
61+
ln -sf /dev/stdout /var/log/nginx/access.log && \
62+
ln -sf /dev/stderr /var/log/nginx/error.log && \
63+
# CLEAN UP #################################################################
64+
rm /etc/nginx/conf.d/default.conf && \
65+
apt clean -y && \
66+
apt autoclean -y && \
67+
apt remove -y wget && \
68+
apt autoremove -y && \
69+
rm -rf /var/lib/apt/lists/* /var/lib/log/* /tmp/* /var/tmp/*
70+
71+
# PHP
72+
ADD ./php/php-fpm.conf /etc/php/8.4/
73+
ADD ./php/php.ini /etc/php/8.4/conf.d/
74+
75+
# NGINX
76+
ADD ./nginx/nginx.conf /etc/nginx/
77+
ADD ./nginx/mime.types /etc/nginx/
78+
ADD ./nginx/sites.d /etc/nginx/sites.d
79+
80+
# WWW
81+
ADD ./www /srv/www/
82+
83+
# SUPERVISOR
84+
ADD ./supervisor/supervisord.conf /etc/supervisor/
85+
ADD ./supervisor/services /etc/supervisor/conf.d/
86+
87+
# APPLICATION
88+
WORKDIR /srv
89+
90+
# PORTS
91+
EXPOSE 80
92+
COPY entrypoint.sh /usr/sbin/entrypoint.sh
93+
RUN chmod +x /usr/sbin/entrypoint.sh
94+
CMD ["/usr/sbin/entrypoint.sh"]

debian-php-84/entrypoint.sh

Lines changed: 13 additions & 0 deletions
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-84/nginx/mime.types

Lines changed: 135 additions & 0 deletions
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+
}

0 commit comments

Comments
 (0)