Alpine 3.12
PHP 7.3
Nginx + PHP FPM optimized
Custom nginx configuraiton
Runit (instead of Supervisord)
Composer latest
Common PHP extensions
FROM getvivekv/alpine-docker-nginx-php7
# Copy your project content
COPY html /var/www/html
RUN composer install --optimize-autoloader --no-interaction --no-progress
An optimized php.ini for production is loaded by default. You can add additional parameters to this php.ini. Example
FROM getvivekv/alpine-docker-nginx-php7
# Copy your project content
COPY html /var/www/html/
RUN composer install --optimize-autoloader --no-interaction --no-progress
RUN echo "session.save_handler = redis" >> /etc/php7/conf.d/custom.ini && \
echo 'session.save_path = "tcp://redis:6379"' >> /etc/php7/conf.d/custom.ini
If you have any shell script that you would want to execute before nginx starts, put those in a folder and add those to /startup.d
FROM getvivekv/alpine-docker-nginx-php7
# Copy your project content
COPY html /var/www/html
RUN composer install --optimize-autoloader --no-interaction --no-progress
RUN echo "session.save_handler = redis" >> /etc/php7/conf.d/custom.ini && \
echo 'session.save_path = "tcp://redis:6379"' >> /etc/php7/conf.d/custom.ini
ADD startup /startup.d/
Content type
Image
Digest
sha256:f71904f93…
Size
29.4 MB
Last updated
over 3 years ago
docker pull getvivekv/alpine-docker-nginx-php7