Skip to content

Commit 8991970

Browse files
ohmyfelixf3l1x
authored andcommitted
Add PHP 8.5 version
1 parent 73ad16a commit 8991970

17 files changed

Lines changed: 484 additions & 5 deletions

File tree

.github/workflows/docker.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ jobs:
3131
- { context: debian-php-82, tag: php-82 }
3232
- { context: debian-php-83, tag: php-83 }
3333
- { context: debian-php-84, tag: php-84 }
34+
- { context: debian-php-85, tag: php-85 }

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ templates:
1111
cp -R .templates/ debian-php-82
1212
cp -R .templates/ debian-php-83
1313
cp -R .templates/ debian-php-84
14+
cp -R .templates/ debian-php-85
1415

1516
_docker-build-%: VERSION=$*
1617
_docker-build-%:
@@ -29,6 +30,7 @@ docker-build-php-81: _docker-build-php-81
2930
docker-build-php-82: _docker-build-php-82
3031
docker-build-php-83: _docker-build-php-83
3132
docker-build-php-84: _docker-build-php-84
33+
docker-build-php-85: _docker-build-php-85
3234

3335
docker-build-all:
3436
$(MAKE) docker-build-php-70
@@ -41,6 +43,7 @@ docker-build-all:
4143
$(MAKE) docker-build-php-82
4244
$(MAKE) docker-build-php-83
4345
$(MAKE) docker-build-php-84
46+
$(MAKE) docker-build-php-85
4447

4548

4649
docker-test-all:
@@ -54,6 +57,7 @@ docker-test-all:
5457
$(MAKE) _docker-test-php-82
5558
$(MAKE) _docker-test-php-83
5659
$(MAKE) _docker-test-php-84
60+
$(MAKE) _docker-test-php-85
5761

5862
_docker-test-%: VERSION=$*
5963
_docker-test-%:

README.md

Lines changed: 6 additions & 5 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/8.4 + 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/8.5 + FPM, supervisor, cron).
55
</p>
66

77
<p align=center>
@@ -22,7 +22,7 @@ This project provides ready-to-use Docker images for web development and deploym
2222

2323
### Key Features
2424

25-
- **Multiple PHP Versions**: Support for PHP 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3, and 8.4
25+
- **Multiple PHP Versions**: Support for PHP 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4, and 8.5
2626
- **Nginx Web Server**: Pre-configured with sensible defaults for PHP applications
2727
- **PHP-FPM**: Optimized for performance with common extensions installed
2828
- **Supervisor**: Process control system to manage services
@@ -35,6 +35,7 @@ This project provides ready-to-use Docker images for web development and deploym
3535

3636
| Image | Distro | PHP |
3737
|-----------------------|----------|-----|
38+
| `dockette/web:php-85` | Bookworm | 8.5 |
3839
| `dockette/web:php-84` | Bookworm | 8.4 |
3940
| `dockette/web:php-83` | Bookworm | 8.3 |
4041
| `dockette/web:php-82` | Bookworm | 8.2 |
@@ -54,7 +55,7 @@ docker run \
5455
--rm \
5556
--name www \
5657
-p 80:80 \
57-
dockette/web:php-84
58+
dockette/web:php-85
5859
```
5960

6061
### Custom Nginx config
@@ -69,7 +70,7 @@ docker run \
6970
--name www \
7071
-v my-lovely-nginx.conf:/etc/nginx/sites.d/site.conf \
7172
-p 80:80 \
72-
dockette/web:php-84
73+
dockette/web:php-85
7374
```
7475

7576
### Run cron tasks
@@ -84,7 +85,7 @@ docker run \
8485
--name www \
8586
-v my-crontab:/etc/cron.d/app \
8687
-p 80:80 \
87-
dockette/web:php-84
88+
dockette/web:php-85
8889
```
8990

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

debian-php-85/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.5/mods-available
5+
ENV PHP_CLI_DIR=/etc/php/8.5/cli/
6+
ENV PHP_CLI_CONF_DIR=${PHP_CLI_DIR}/conf.d
7+
ENV PHP_CGI_DIR=/etc/php/8.5/cgi/
8+
ENV PHP_CGI_CONF_DIR=${PHP_CGI_DIR}/conf.d
9+
ENV PHP_FPM_DIR=/etc/php/8.5/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.5
13+
ENV PHP_FPM_CONF=/etc/php/8.5/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.5-apcu \
31+
php8.5-bz2 \
32+
php8.5-bcmath \
33+
php8.5-calendar \
34+
php8.5-cgi \
35+
php8.5-cli \
36+
php8.5-ctype \
37+
php8.5-curl \
38+
php8.5-fpm \
39+
php8.5-gettext \
40+
php8.5-gd \
41+
php8.5-intl \
42+
php8.5-imap \
43+
php8.5-ldap \
44+
php8.5-mbstring \
45+
# php8.5-mongo \
46+
php8.5-mysql \
47+
php8.5-pdo \
48+
php8.5-pgsql \
49+
php8.5-redis \
50+
php8.5-soap \
51+
php8.5-sqlite3 \
52+
php8.5-ssh2 \
53+
php8.5-tidy \
54+
php8.5-zip \
55+
php8.5-xmlrpc \
56+
php8.5-xsl && \
57+
if apt-cache show php8.5-memcached > /dev/null 2>&1; then apt install -y --no-install-recommends php8.5-memcached; fi && \
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.5/
73+
ADD ./php/php.ini /etc/php/8.5/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-85/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-85/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)