HUB
Sign inSign up
php-nginx logo

clivewalkden/php-nginx

By clivewalkden

•Updated over 5 years ago

Combined PHP and nginx container

Image
0

3.1K

clivewalkden/php-nginx repository overview

⁠PHP & Nginx Container v1.3.0

Build PHP 7.x Nginx

Base images are based on the official php-fpm⁠ images based on Debian Stretch (7.2-stretch, 7.3-stretch) and Buster (7.2, 7.3, 7.4).

⁠Container Usage

Simply create a Dockerfile in your php application. Something similar to the following.

FROM clivewalkden/php-nginx:7.4

# Copy in nginx config and vhost conf
COPY ./.docker/nginx.conf /etc/nginx/nginx.conf
COPY ./.docker/nginx-site.conf /etc/nginx/conf.d/default.conf

# Copy your php application into the image
WORKDIR /var/www/app
COPY --chown=www-data:www-data . /var/www/app/

# (Optional) Composer install
RUN composer install --no-scripts --no-autoloader --ansi --no-interaction

# Expose the relevant ports
EXPOSE 80 443 9000 9001

# Start supervisor to bring up php-fpm and nginx in the same container
CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/conf.d/supervisord.conf"]

Tag summary

Content type

Image

Digest

Size

180.9 MB

Last updated

over 5 years ago

docker pull clivewalkden/php-nginx