Sign inSign up

tonycn/nginx-php

By tonycn

•Updated almost 4 years ago

nginx-php

Image
0

218

tonycn/nginx-php repository overview

Configure Docker Container Nginx-Php7.4-Fpm Image Based FROM debian:stable-slim https://github.com/hongwenjun/nginx-php⁠

Start The Nginx-Php7.4-Fpm Container

docker run -d -p 80:80 -p 443:443
--cpus 0.8 --restart=always
-v /var/www/html:/var/www/html
--name nginx-php
tonycn/nginx-php

docker run -d -p 80:80 -p 443:443 --cpus 0.8 --restart=always -v /var/www/html:/var/www/html --name nginx-php tonycn/nginx-php

Docker build Dockerfile https://git.io/nginx-php⁠ docker build -t nginx-php https://git.io/nginx-php⁠ Dockerfile file Use supervisor to start php-fpm and nginx services FROM debian:stable-slim

RUN apt update -y &&
apt install -y --no-install-recommends --no-install-suggests nginx supervisor wget
php7.4 php7.4-fpm php7.4-sqlite3 php7.4-xml php7.4-zip php7.4-pgsql php7.4-mbstring
php7.4-bcmath php7.4-json php7.4-mysql php7.4-gd php7.4-cli php7.4-curl php7.4-cgi &&
mkdir -p /var/run/php /run/php /etc/nginx/cert &&
wget https://raw.githubusercontent.com/hongwenjun/nginx-php/main/start.sh⁠ --no-check-certificate &&
wget https://raw.githubusercontent.com/hongwenjun/nginx-php/main/default⁠ --no-check-certificate &&
wget https://raw.githubusercontent.com/hongwenjun/nginx-php/main/supervisord.conf⁠ --no-check-certificate &&
mv ./default /etc/nginx/sites-enabled/default &&
mv ./supervisord.conf /etc/supervisord.conf &&
chmod +x /start.sh &&
ln -sf /dev/stdout /var/log/nginx/access.log &&
ln -sf /dev/stderr /var/log/nginx/error.log &&
echo "" > /var/www/html/index.php &&
apt remove -y wget &&
rm -rf /var/lib/apt/lists/* /var/cache/apt

EXPOSE 80/tcp 443/tcp

⁠VOLUME [ /var/www/html /etc/nginx/conf.d /etc/nginx/cert ]

⁠COPY ./default /etc/nginx/sites-enabled/default

⁠COPY ./supervisord.conf /etc/supervisord.conf

⁠COPY ./start.sh /start.sh

CMD ["/start.sh"]

Tag summary

Content type

Image

Digest

sha256:94bb27c4e…

Size

83.8 MB

Last updated

almost 4 years ago

docker pull tonycn/nginx-php