-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (33 loc) · 949 Bytes
/
Copy pathDockerfile
File metadata and controls
38 lines (33 loc) · 949 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# FrankenPHP + PHP extensions only
FROM dunglas/frankenphp:php8.5
# System libs for GD, gosu (drop privileges), libcap2-bin (setcap for :80/:443)
RUN apt-get update && apt-get install -y --no-install-recommends \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
libwebp-dev \
curl \
gosu \
libcap2-bin \
&& rm -rf /var/lib/apt/lists/* \
&& setcap CAP_NET_BIND_SERVICE=+eip /usr/local/bin/frankenphp \
&& gosu nobody true
RUN docker-php-ext-configure gd \
--with-freetype \
--with-jpeg \
--with-webp
# Install required PHP extensions for WordPress
RUN install-php-extensions \
bcmath \
exif \
gd \
intl \
mysqli \
zip \
opcache \
redis
# Copy entrypoint script
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
# Entrypoint starts as root, then drops to HOST_UID:HOST_GID
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]