forked from Lars-/opensource-digwebinterface
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.php-only
More file actions
37 lines (29 loc) · 897 Bytes
/
Dockerfile.php-only
File metadata and controls
37 lines (29 loc) · 897 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
FROM php:8.3-fpm-alpine
# Install required packages
RUN apk add --no-cache \
bind-tools \
&& docker-php-ext-install -j$(nproc) \
opcache
# Configure PHP
RUN { \
echo 'opcache.memory_consumption=128'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=4000'; \
echo 'opcache.revalidate_freq=2'; \
echo 'opcache.fast_shutdown=1'; \
echo 'opcache.enable_cli=1'; \
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
# Set working directory
WORKDIR /var/www/html
# Copy application files
COPY . /var/www/html
# Create cache directory with proper permissions
RUN mkdir -p cache && \
chown -R www-data:www-data cache && \
chmod 755 cache
# Copy entrypoint script
COPY docker/entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/entrypoint.sh
EXPOSE 9000
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["php-fpm"]