-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
executable file
·32 lines (24 loc) · 1.22 KB
/
Copy pathDockerfile.dev
File metadata and controls
executable file
·32 lines (24 loc) · 1.22 KB
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
FROM php:8.3-fpm-alpine
LABEL maintainer="PHPMark Framework"
LABEL description="Simple SSR Blog Framework - Development"
# Install nginx
RUN apk add --no-cache nginx
# Create web user with proper permissions
RUN adduser -D -s /bin/sh webuser && \
addgroup webuser www-data
# PHP optimizations for DEVELOPMENT (with hot reload)
RUN docker-php-ext-install opcache && \
echo "opcache.enable=1" >> /usr/local/etc/php/conf.d/opcache.ini && \
echo "opcache.memory_consumption=64" >> /usr/local/etc/php/conf.d/opcache.ini && \
echo "opcache.max_accelerated_files=4000" >> /usr/local/etc/php/conf.d/opcache.ini && \
echo "opcache.revalidate_freq=2" >> /usr/local/etc/php/conf.d/opcache.ini && \
echo "opcache.validate_timestamps=1" >> /usr/local/etc/php/conf.d/opcache.ini && \
echo "opcache.file_update_protection=0" >> /usr/local/etc/php/conf.d/opcache.ini
# Create required directories
RUN mkdir -p /tmp/nginx /run/nginx /var/log/nginx /var/lib/nginx /var/www && \
chown -R webuser:webuser /var/log/nginx /var/lib/nginx /tmp/nginx /run/nginx
EXPOSE 8080
# Copy entrypoint script
COPY docker/entrypoint.dev.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/entrypoint.dev.sh
CMD ["/usr/local/bin/entrypoint.dev.sh"]